Mercurial > pidgin
diff libpurple/protocols/oscar/family_locate.c @ 29986:f18b6eb0ed02
Cleanup, basically. Move the icbm snac error handling from oscar.c to
family_icbm.c so we don't have to bother we va_args. This is simpler,
and gives us the benefit of type checking by the compiler, which will
help avoid the crash bug we encountered.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 20 May 2010 02:44:00 +0000 |
parents | 0d3145e6b1d6 |
children | 9881f18b95b1 |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_locate.c Thu May 20 01:39:52 2010 +0000 +++ b/libpurple/protocols/oscar/family_locate.c Thu May 20 02:44:00 2010 +0000 @@ -1231,7 +1231,8 @@ guint16 reason; char *bn; - if (!(snac2 = aim_remsnac(od, snac->id))) { + snac2 = aim_remsnac(od, snac->id); + if (!snac2) { purple_debug_misc("oscar", "locate error: received response from unknown request!\n"); return 0; } @@ -1243,7 +1244,8 @@ return 0; } - if (!(bn = snac2->data)) { + bn = snac2->data; + if (!bn) { purple_debug_misc("oscar", "locate error: received response from request without a buddy name!\n"); g_free(snac2); return 0; @@ -1255,8 +1257,7 @@ if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) ret = userfunc(od, conn, frame, reason, bn); - if (snac2) - g_free(snac2->data); + g_free(snac2->data); g_free(snac2); return ret;