pidgin: b85fc7b3: Don't cycle through a NULL "message" whe...
evands at pidgin.im
evands at pidgin.im
Sat Jun 14 15:15:53 EDT 2008
-----------------------------------------------------------------
Revision: b85fc7b346686a23aef2ede5c3bcb6eae2ecd6a2
Ancestor: 5387bc28fa09b238593c3dc292863ec3ce5f3c4e
Author: evands at pidgin.im
Date: 2008-06-14T19:12:47
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b85fc7b346686a23aef2ede5c3bcb6eae2ecd6a2
Modified files:
libpurple/protocols/oscar/oscar.c
ChangeLog:
Don't cycle through a NULL "message" when purple_parse_oncoming() is called
for an away oscar buddy. purple_got_infoblock() will supply a message as
appropriate.
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/oscar.c 1f34ccc5987c14acb345bf26bc61be5f67e86513
+++ libpurple/protocols/oscar/oscar.c 78124320d961df398530b3397540a78fdd9d9e49
@@ -1977,7 +1977,17 @@ static int purple_parse_oncoming(OscarDa
}
else
{
- purple_prpl_got_user_status(account, info->sn, status_id, NULL);
+ PurpleBuddy *b = purple_find_buddy(account, info->sn);
+ PurplePresence *presence = purple_buddy_get_presence(b);
+ PurpleStatus *old_status = purple_presence_get_active_status(presence);
+ PurpleStatus *new_status = purple_presence_get_status(presence, status_id);
+
+ /* If our status_id would change with this update, pass it to the core.
+ * However, if our status_id would not change, do nothing; as we would clear out any existing
+ * attributes on the status prematurely. purple_got_infoblock() will update the message as needed.
+ */
+ if (old_status != new_status)
+ purple_prpl_got_user_status(account, info->sn, status_id, NULL);
}
/* Login time stuff */
More information about the Commits
mailing list