Mercurial > pidgin
diff src/protocols/jabber/presence.c @ 8043:9a6df4d567e0
[gaim-migrate @ 8727]
I think I can sneak this stuff in here before we release
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 10 Jan 2004 01:48:24 +0000 |
parents | c4b5a35c7a12 |
children | 8f4ce853e685 |
line wrap: on
line diff
--- a/src/protocols/jabber/presence.c Fri Jan 09 16:58:33 2004 +0000 +++ b/src/protocols/jabber/presence.c Sat Jan 10 01:48:24 2004 +0000 @@ -153,9 +153,11 @@ xmlnode *y; gboolean muc = FALSE; - jb = jabber_buddy_find(js, from, TRUE); - if(!jb) + if(!(jb = jabber_buddy_find(js, from, TRUE))) + return; + + if(!(jid = jabber_id_new(from))) return; if(jb->error_msg) { @@ -188,9 +190,11 @@ _("Authorize"), G_CALLBACK(authorize_add_cb), _("Deny"), G_CALLBACK(deny_add_cb)); g_free(msg); + jabber_id_free(jid); return; } else if(type && !strcmp(type, "subscribed")) { /* we've been allowed to see their presence, but we don't care */ + jabber_id_free(jid); return; } else { if((y = xmlnode_get_child(packet, "show"))) { @@ -212,8 +216,6 @@ } } - if(!(jid = jabber_id_new(from))) - return; for(y = packet->child; y; y = y->next) { if(y->type != NODE_TYPE_TAG) @@ -377,7 +379,12 @@ if(state == JABBER_STATE_ERROR || (type && (!strcmp(type, "unavailable") || !strcmp(type, "unsubscribed")))) { + GaimConversation *conv; + jabber_buddy_remove_resource(jb, jid->resource); + if((conv = jabber_find_unnormalized_conv(from, js->gc->account))) + gaim_conversation_set_name(conv, buddy_name); + } else { jabber_buddy_track_resource(jb, jid->resource, priority, state, status);