Mercurial > pidgin
diff libpurple/protocols/qq/im.c @ 24138:dc112387190f
2008.09.29 - ccpaging <ccpaging(at)gmail.com>
* 'Check Password' function for protocol 2007/2008
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Wed, 22 Oct 2008 14:41:13 +0000 |
parents | dbc7a9742f8d |
children | 619ac2303c46 |
line wrap: on
line diff
--- a/libpurple/protocols/qq/im.c Wed Oct 22 14:40:04 2008 +0000 +++ b/libpurple/protocols/qq/im.c Wed Oct 22 14:41:13 2008 +0000 @@ -298,24 +298,21 @@ { qq_data *qd; gchar *from; - PurpleBuddy *b; - qq_buddy *qq_b; + PurpleBuddy *buddy; time_t now = time(NULL); qd = (qq_data *) gc->proto_data; - from = uid_to_purple_name(qd->uid); g_return_if_fail(qd->uid > 0); - b = purple_find_buddy(gc->account, from); - if (b == NULL) { - qq_create_buddy(gc, qd->uid, FALSE, TRUE); - b = purple_find_buddy(gc->account, from); + from = uid_to_purple_name(qd->uid); + buddy = purple_find_buddy(gc->account, from); + if (buddy == NULL) { + qq_create_buddy(gc, qd->uid, TRUE, TRUE); } - qq_b = (b == NULL) ? NULL : (qq_buddy *) b->proto_data; - g_return_if_fail(qq_b != NULL); serv_got_im(gc, from, msg, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NOTIFY, now); + g_free(from); } /* process received normal text IM */