pidgin: 46797f86: Fix some problems adding "stuff" to osca...
markdoliner at pidgin.im
markdoliner at pidgin.im
Wed Sep 23 21:55:49 EDT 2009
-----------------------------------------------------------------
Revision: 46797f86bb26f4b4c73cd408387c3f5ca9caccca
Ancestor: 5ebb1a8fdd12e476a48622bc1c64a58607c3bc30
Author: markdoliner at pidgin.im
Date: 2009-09-24T01:50:02
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/46797f86bb26f4b4c73cd408387c3f5ca9caccca
Modified files:
libpurple/protocols/oscar/family_feedbag.c
ChangeLog:
Fix some problems adding "stuff" to oscar buddy lists, where "stuff" is
often buddies to block, but can also be buddies to allow or maybe
your privacy setting. I imagine this eliminates some "unable to add buddy"
errors.
Apparently I discovered this idiosyncrasy on 2007-04-23 and fixed it for
icon items in 5ee6fd5ddac3a8e8920941dee8be3ae5a615c105, but for some
reason I didn't fix it for any other types of items.
I'm also making this loop a bit less heavy handed... it used to require
that new items had an itemID greater than every other item. Now it just
makes sure the itemID is not equal the itemID and not equal to the groupID
of any other item.
Let it be known that the best way for me to fix blocking is to have people
I don't want to talk to IM me.
-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/family_feedbag.c 6a32327d1bb3547f76ec833f78b8a326985c4512
+++ libpurple/protocols/oscar/family_feedbag.c d4808efd464b029ecff3857b1d2d61a7867ef0c9
@@ -135,13 +135,18 @@ static struct aim_ssi_item *aim_ssi_item
}
} while (exists);
}
- } else if (type == AIM_SSI_TYPE_ICONINFO) {
+ } else if (new->gid == 0x0000) {
+ /*
+ * This is weird, but apparently items in the root group can't
+ * have a buddy ID equal to any group ID. You'll get error
+ * 0x0003 when trying to add, which is "item already exists"
+ */
if (new->bid == 0xFFFF) {
do {
new->bid += 0x0001;
exists = FALSE;
for (cur = *list; cur != NULL; cur = cur->next)
- if ((cur->bid >= new->bid) || (cur->gid >= new->bid)) {
+ if (cur->bid == new->bid || cur->gid == new->bid) {
exists = TRUE;
break;
}
@@ -153,7 +158,7 @@ static struct aim_ssi_item *aim_ssi_item
new->bid += 0x0001;
exists = FALSE;
for (cur = *list; cur != NULL; cur = cur->next)
- if ((cur->bid == new->bid) && (cur->gid == new->gid)) {
+ if (cur->bid == new->bid && cur->gid == new->gid) {
exists = TRUE;
break;
}
More information about the Commits
mailing list