im.pidgin.pidgin: 2f94504ca2351b6dcbdda71216e14994e77ce8dc
rlaager at pidgin.im
rlaager at pidgin.im
Sun Jan 13 23:22:29 EST 2008
-----------------------------------------------------------------
Revision: 2f94504ca2351b6dcbdda71216e14994e77ce8dc
Ancestor: 3f255830c687ae1da6294f773321ca6684bb1722
Author: rlaager at pidgin.im
Date: 2008-01-13T20:48:56
Branch: im.pidgin.pidgin
Modified files:
libpurple/log.c
ChangeLog:
Part of a large patch from o_sukhodolsky to fix some build warnings.
Refs #1344
-------------- next part --------------
============================================================
--- libpurple/log.c 3dad12a18a307cd93938eead28850ef154763e23
+++ libpurple/log.c 0a150afe4dffb81e04ac49e93cfc20c2d16858db
@@ -1859,11 +1859,15 @@ static char * old_logger_read (PurpleLog
static char * old_logger_read (PurpleLog *log, PurpleLogReadFlags *flags)
{
+ size_t result;
struct old_logger_data *data = log->logger_data;
- FILE *file = g_fopen(purple_stringref_value(data->pathref), "rb");
+ const char *path = purple_stringref_value(data->pathref);
+ FILE *file = g_fopen(path, "rb");
char *read = g_malloc(data->length + 1);
fseek(file, data->offset, SEEK_SET);
- fread(read, data->length, 1, file);
+ result = fread(read, data->length, 1, file);
+ if (result != 1)
+ purple_debug_error("log", "Unable to read from log file: %s\n", path);
fclose(file);
read[data->length] = '\0';
*flags = 0;
More information about the Commits
mailing list