Mercurial > pidgin
changeset 17983:535a71646a47
merge of '94cf3fba654fb39e507971153b5c217b7f98949d'
and 'becd062e1d512d285c72dd8efa960e04b6322b73'
author | Michael Shkutkov <mshkutkov@soc.pidgin.im> |
---|---|
date | Sat, 16 Jun 2007 05:42:29 +0000 |
parents | ee8b3014bc36 (current diff) b5e9a814b711 (diff) |
children | 285779ebfe0b |
files | |
diffstat | 1 files changed, 10 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ "<b>%s</b></span>: ", acct_name); } - /* find next line */ - while(c && *c != '\n') - c++; + /* find EOF */ + c = strstr(c, "\n"); line = ++c;