comparison libpurple/plugins/log_reader.c @ 18168:285779ebfe0b

propagate from branch 'im.pidgin.pidgin' (head f61e46616c5562046a9f89a538ae10f5e5ef29ae) to branch 'im.pidgin.soc.2007.remotelogging' (head c8ca0bef43c668d71394e63296b0a07fd0496e59)
author Michael Shkutkov <mshkutkov@soc.pidgin.im>
date Sun, 17 Jun 2007 21:03:22 +0000
parents b5e9a814b711 c0cd4d84ba52
children e9d751afc90b
comparison
equal deleted inserted replaced
17983:535a71646a47 18168:285779ebfe0b
1288 1288
1289 trillian_logger_finalize((PurpleLog *)last->data); 1289 trillian_logger_finalize((PurpleLog *)last->data);
1290 list = g_list_delete_link(list, last); 1290 list = g_list_delete_link(list, last);
1291 } 1291 }
1292 } 1292 }
1293 } else if (line[0] && line[1] && line [3] && 1293 } else if (line[0] && line[1] && line[2] &&
1294 purple_str_has_prefix(&line[3], "sion Start ")) { 1294 purple_str_has_prefix(&line[3], "sion Start ")) {
1295 1295 /* The conditional is to make sure we're not reading off
1296 * the end of the string. We don't want strlen(), as that'd
1297 * have to count the whole string needlessly.
1298 *
1299 * The odd check here is because a Session Start at the
1300 * beginning of the file can be overwritten with a UTF-8
1301 * byte order mark. Yes, it's weird.
1302 */
1296 char *their_nickname = line; 1303 char *their_nickname = line;
1297 char *timestamp; 1304 char *timestamp;
1298 1305
1299 if (data && !data->length) 1306 if (data && !data->length)
1300 data->length = last_line_offset - data->offset; 1307 data->length = last_line_offset - data->offset;