Mercurial > pidgin
comparison libpurple/protocols/oscar/family_userlookup.c @ 17369:f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
No functionality change.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 29 May 2007 09:51:51 +0000 |
parents | 1927f4ead3ca |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
17368:b31f53796f3b | 17369:f80f7e1047be |
---|---|
87 * | 87 * |
88 */ | 88 */ |
89 static int reply(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs) | 89 static int reply(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs) |
90 { | 90 { |
91 int j = 0, m, ret = 0; | 91 int j = 0, m, ret = 0; |
92 aim_tlvlist_t *tlvlist; | 92 GSList *tlvlist; |
93 char *cur = NULL, *buf = NULL; | 93 char *cur = NULL, *buf = NULL; |
94 aim_rxcallback_t userfunc; | 94 aim_rxcallback_t userfunc; |
95 aim_snac_t *snac2; | 95 aim_snac_t *snac2; |
96 const char *searchaddr = NULL; | 96 const char *searchaddr = NULL; |
97 | 97 |
98 if ((snac2 = aim_remsnac(od, snac->id))) | 98 if ((snac2 = aim_remsnac(od, snac->id))) |
99 searchaddr = (const char *)snac2->data; | 99 searchaddr = (const char *)snac2->data; |
100 | 100 |
101 tlvlist = aim_tlvlist_read(bs); | 101 tlvlist = aim_tlvlist_read(bs); |
102 m = aim_tlvlist_count(&tlvlist); | 102 m = aim_tlvlist_count(tlvlist); |
103 | 103 |
104 /* XXX uhm. | 104 /* XXX uhm. |
105 * This is the only place that uses something other than 1 for the 3rd | 105 * This is the only place that uses something other than 1 for the 3rd |
106 * parameter to aim_tlv_gettlv_whatever(). | 106 * parameter to aim_tlv_gettlv_whatever(). |
107 */ | 107 */ |
114 | 114 |
115 j++; | 115 j++; |
116 } | 116 } |
117 g_free(cur); | 117 g_free(cur); |
118 | 118 |
119 aim_tlvlist_free(&tlvlist); | 119 aim_tlvlist_free(tlvlist); |
120 | 120 |
121 if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) | 121 if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) |
122 ret = userfunc(od, conn, frame, searchaddr, j, buf); | 122 ret = userfunc(od, conn, frame, searchaddr, j, buf); |
123 | 123 |
124 /* XXX freesnac()? */ | 124 /* XXX freesnac()? */ |