# HG changeset patch # User Michael Shkutkov # Date 1181972549 0 # Node ID 535a71646a47a3f17836b6593655e46635688e59 # Parent ee8b3014bc363c6cb185d3264fd1af6ca1e1335d# Parent b5e9a814b711c59f166c3d5c8d9fe5a85d1f6f41 merge of '94cf3fba654fb39e507971153b5c217b7f98949d' and 'becd062e1d512d285c72dd8efa960e04b6322b73' diff -r ee8b3014bc36 -r 535a71646a47 libpurple/plugins/log_reader.c --- a/libpurple/plugins/log_reader.c Wed Jun 13 12:26:39 2007 +0000 +++ b/libpurple/plugins/log_reader.c Sat Jun 16 05:42:29 2007 +0000 @@ -1766,9 +1766,6 @@ gsize length; gchar *c; - purple_debug(PURPLE_DEBUG_INFO, "QIP logger list", - "start\n"); - g_return_val_if_fail(sn != NULL, list); g_return_val_if_fail(account != NULL, list); @@ -1826,15 +1823,12 @@ purple_str_has_prefix(c, QIP_LOG_OUT_MESSAGE)) { /* find next line */ - while(*c && *c != '\n') { - c++; - } + c = strstr(c, "\n"); if (*c) { - char *timestamp = c; + char *timestamp = ++c; - while (*timestamp && (*timestamp !='(')) - timestamp++; + timestamp = strstr(timestamp, "("); if (*timestamp == '(') { struct tm tm; @@ -1963,15 +1957,14 @@ purple_debug(PURPLE_DEBUG_INFO, "QIP loggger read", "%s message\n", (is_in_message) ? "incoming" : "Outgoing"); - /* find next line */ - while(*c && *c!= '\n') - c++; + /* find EOL */ + c = strstr(c, "\n"); + /* XXX: Do we need buddy_name when we have buddy->alias? */ - buddy_name = c; + buddy_name = ++c; /* we hope that nickname hasn't '(' symbol */ - while (*c && *c != '(') - c++; + c = strstr(c, "("); if (*c == '(') { const char *timestamp = c; @@ -2010,9 +2003,8 @@ "%s: ", acct_name); } - /* find next line */ - while(c && *c != '\n') - c++; + /* find EOF */ + c = strstr(c, "\n"); line = ++c;