comparison plugins/log_reader.c @ 13668:5c8565315d3e

[gaim-migrate @ 16070] CID 104: Function: trillian_logger_list Description: Variable "data" tracked as NULL was dereferenced. Yet another reminder that I need to work on this plugin again. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 20 Apr 2006 05:12:22 +0000
parents 2f0d4179ec05
children 85267a333422
comparison
equal deleted inserted replaced
13667:f8a44204b1bc 13668:5c8565315d3e
1129 continue; 1129 continue;
1130 } 1130 }
1131 1131
1132 *c = '\0'; 1132 *c = '\0';
1133 if (gaim_str_has_prefix(line, "Session Close ")) { 1133 if (gaim_str_has_prefix(line, "Session Close ")) {
1134 if (data && !data->length) 1134 if (data && !data->length) {
1135 data->length = last_line_offset - data->offset; 1135 if (!(data->length = last_line_offset - data->offset)) {
1136 if (!data->length) { 1136 /* This log had no data, so we remove it. */
1137 /* This log had no data, so we remove it. */ 1137 GList *last = g_list_last(list);
1138 GList *last = g_list_last(list); 1138
1139 1139 gaim_debug(GAIM_DEBUG_INFO, "Trillian log list",
1140 gaim_debug(GAIM_DEBUG_INFO, "Trillian log list", 1140 "Empty log. Offset %i\n", data->offset);
1141 "Empty log. Offset %i\n", data->offset); 1141
1142 1142 trillian_logger_finalize((GaimLog *)last->data);
1143 trillian_logger_finalize((GaimLog *)last->data); 1143 list = g_list_delete_link(list, last);
1144 list = g_list_delete_link(list, last); 1144 }
1145 } 1145 }
1146 } else if (line[0] && line[1] && line [3] && 1146 } else if (line[0] && line[1] && line [3] &&
1147 gaim_str_has_prefix(&line[3], "sion Start ")) { 1147 gaim_str_has_prefix(&line[3], "sion Start ")) {
1148 1148
1149 char *their_nickname = line; 1149 char *their_nickname = line;