Mercurial > pidgin.yaz
comparison src/protocols/jabber/presence.c @ 11127:719779387f96
[gaim-migrate @ 13183]
Change the base16 and base64 functions to use better data types,
and make appropriate changes to other parts of the Gaim code
to get rid of a few warnings and hopefully make things more
correct.
In other news, why is CVS HEAD crashing for me on exit?
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 19 Jul 2005 05:15:45 +0000 |
parents | 7653143dec36 |
children | 096020ae09a9 |
comparison
equal
deleted
inserted
replaced
11126:2a3568cbd8a6 | 11127:719779387f96 |
---|---|
204 static void jabber_vcard_parse_avatar(JabberStream *js, xmlnode *packet, gpointer blah) | 204 static void jabber_vcard_parse_avatar(JabberStream *js, xmlnode *packet, gpointer blah) |
205 { | 205 { |
206 JabberBuddy *jb = NULL; | 206 JabberBuddy *jb = NULL; |
207 GaimBuddy *b = NULL; | 207 GaimBuddy *b = NULL; |
208 xmlnode *vcard, *photo, *binval; | 208 xmlnode *vcard, *photo, *binval; |
209 char *text, *data; | 209 char *text; |
210 int size; | 210 guint8 *data; |
211 gsize size; | |
211 const char *from = xmlnode_get_attrib(packet, "from"); | 212 const char *from = xmlnode_get_attrib(packet, "from"); |
212 | 213 |
213 if(!from) | 214 if(!from) |
214 return; | 215 return; |
215 | 216 |
220 if((vcard = xmlnode_get_child(packet, "vCard")) || | 221 if((vcard = xmlnode_get_child(packet, "vCard")) || |
221 (vcard = xmlnode_get_child_with_namespace(packet, "query", "vcard-temp"))) { | 222 (vcard = xmlnode_get_child_with_namespace(packet, "query", "vcard-temp"))) { |
222 if((photo = xmlnode_get_child(vcard, "PHOTO")) && | 223 if((photo = xmlnode_get_child(vcard, "PHOTO")) && |
223 (binval = xmlnode_get_child(photo, "BINVAL")) && | 224 (binval = xmlnode_get_child(photo, "BINVAL")) && |
224 (text = xmlnode_get_data(binval))) { | 225 (text = xmlnode_get_data(binval))) { |
225 gaim_base64_decode(text, &data, &size); | 226 data = gaim_base64_decode(text, &size); |
226 | 227 |
227 gaim_buddy_icons_set_for_user(js->gc->account, from, data, size); | 228 gaim_buddy_icons_set_for_user(js->gc->account, from, data, size); |
228 if((b = gaim_find_buddy(js->gc->account, from))) { | 229 if((b = gaim_find_buddy(js->gc->account, from))) { |
229 unsigned char hashval[20]; | 230 unsigned char hashval[20]; |
230 char hash[41], *p; | 231 char hash[41], *p; |