Mercurial > pidgin
comparison src/protocols/jabber/buddy.c @ 13691:87b027bb1f15
[gaim-migrate @ 16094]
SF Patch #1462332 from cbanal
"When updating an avatar and the accounts vcard / info
is empty. The resulting vCard xml that is sent does not
contain the proper attributes.
This causes the vCard update to be ignored by the
jabber server."
I'm not 100% positive about this, but it seems right.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 25 Apr 2006 17:19:45 +0000 |
parents | d12bbe6da705 |
children | 2cf94cdb2e99 |
comparison
equal
deleted
inserted
replaced
13690:6a86f4ec744e | 13691:87b027bb1f15 |
---|---|
360 { | 360 { |
361 JabberIq *iq; | 361 JabberIq *iq; |
362 JabberStream *js = gc->proto_data; | 362 JabberStream *js = gc->proto_data; |
363 xmlnode *vc_node; | 363 xmlnode *vc_node; |
364 char *avatar_file = NULL; | 364 char *avatar_file = NULL; |
365 struct tag_attr *tag_attr; | |
365 | 366 |
366 if(js->avatar_hash) | 367 if(js->avatar_hash) |
367 g_free(js->avatar_hash); | 368 g_free(js->avatar_hash); |
368 js->avatar_hash = NULL; | 369 js->avatar_hash = NULL; |
369 | 370 |
373 vc_node = info ? xmlnode_from_str(info, -1) : NULL; | 374 vc_node = info ? xmlnode_from_str(info, -1) : NULL; |
374 avatar_file = gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(gc->account)); | 375 avatar_file = gaim_buddy_icons_get_full_path(gaim_account_get_buddy_icon(gc->account)); |
375 | 376 |
376 if(!vc_node && avatar_file) { | 377 if(!vc_node && avatar_file) { |
377 vc_node = xmlnode_new("vCard"); | 378 vc_node = xmlnode_new("vCard"); |
379 for(tag_attr = vcard_tag_attr_list; tag_attr->attr != NULL; ++tag_attr) | |
380 xmlnode_set_attrib(vc_node, tag_attr->attr, tag_attr->value); | |
378 } | 381 } |
379 | 382 |
380 if(vc_node) { | 383 if(vc_node) { |
381 if (vc_node->name && | 384 if (vc_node->name && |
382 !g_ascii_strncasecmp(vc_node->name, "vCard", 5)) { | 385 !g_ascii_strncasecmp(vc_node->name, "vCard", 5)) { |