comparison libpurple/protocols/oscar/family_chatnav.c @ 30406: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 83ae84d4b000
children 553cd883a29a
comparison
equal deleted inserted replaced
30405:c1b8e619f1b8 30406:f18b6eb0ed02
35 int ret = 0; 35 int ret = 0;
36 aim_snac_t *snac2; 36 aim_snac_t *snac2;
37 guint16 error, chatnav_error; 37 guint16 error, chatnav_error;
38 GSList *tlvlist; 38 GSList *tlvlist;
39 39
40 if (!(snac2 = aim_remsnac(od, snac->id))) { 40 snac2 = aim_remsnac(od, snac->id);
41 if (!snac2) {
41 purple_debug_warning("oscar", "chatnav error: received response to unknown request (%08x)\n", snac->id); 42 purple_debug_warning("oscar", "chatnav error: received response to unknown request (%08x)\n", snac->id);
42 return 0; 43 return 0;
43 } 44 }
44 45
45 if (snac2->family != SNAC_FAMILY_CHATNAV) { 46 if (snac2->family != SNAC_FAMILY_CHATNAV) {
65 chatnav_error == 0x0033 ? _("Invalid chat room name") : _("Unknown error")); 66 chatnav_error == 0x0033 ? _("Invalid chat room name") : _("Unknown error"));
66 67
67 ret = 1; 68 ret = 1;
68 } 69 }
69 70
70 if (snac2) 71 g_free(snac2->data);
71 g_free(snac2->data);
72 g_free(snac2); 72 g_free(snac2);
73 73
74 return ret; 74 return ret;
75 } 75 }
76 76