pidgin: 3cb6dd05: The item JID will match the 'to' JID, no...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Thu Jul 16 19:00:38 EDT 2009
-----------------------------------------------------------------
Revision: 3cb6dd057bf70c662dacb908e8d7d65f2145c2af
Ancestor: 3aaf5e76814e614778b16177623436f632cc4b76
Author: darkrain42 at pidgin.im
Date: 2009-07-16T22:56:37
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3cb6dd057bf70c662dacb908e8d7d65f2145c2af
Modified files:
libpurple/protocols/jabber/presence.c
ChangeLog:
The item JID will match the 'to' JID, not the from.
Also, only try to be clever when the item JID is set.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/presence.c 4899395a22a600e7e663105a0d4f143e4a960841
+++ libpurple/protocols/jabber/presence.c fa99c8b14398623545335a18619ec56d2af81f9d
@@ -805,6 +805,7 @@ void jabber_presence_parse(JabberStream
const char *nick;
const char *code = NULL;
const char *item_jid = NULL;
+ const char *to;
xmlnode *stat;
xmlnode *item;
@@ -812,7 +813,6 @@ void jabber_presence_parse(JabberStream
if (item)
item_jid = xmlnode_get_attrib(item, "jid");
-
stat = xmlnode_get_child(x, "status");
if (stat)
@@ -889,7 +889,8 @@ void jabber_presence_parse(JabberStream
* Also possibly works around bits of an Openfire bug. See
* #8319.
*/
- if (is_our_resource && !purple_strequal(from, item_jid)) {
+ to = xmlnode_get_attrib(packet, "to");
+ if (is_our_resource && item_jid && !purple_strequal(to, item_jid)) {
/* TODO: When the above is a loop, this needs to still act
* sanely for all cases (this code is a little fragile). */
if (!kick && !nick_change)
More information about the Commits
mailing list