Mercurial > pidgin.yaz
changeset 4238:0e4be672f516
[gaim-migrate @ 4484]
An ssi fix. Yay.
Previously, when moving a buddy from one group to another, we just
deleted the buddy then added it to the other group. That would
result in needed to re-ask the person for authorization.
This should fix that. It's not really major. Basically, you add
the person to the other group before deleting them from the first
group.
I hope this is verbose enough. Let me know if it's not, and next
time I'll run "./mark -vv"
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 08 Jan 2003 02:14:37 +0000 |
parents | 2b5fa2b2f4ae |
children | 9b40fa57a8ed |
files | src/protocols/oscar/aim.h src/protocols/oscar/ssi.c |
diffstat | 2 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h Wed Jan 08 01:56:03 2003 +0000 +++ b/src/protocols/oscar/aim.h Wed Jan 08 02:14:37 2003 +0000 @@ -1176,7 +1176,7 @@ faim_export char *aim_ssi_itemlist_findparentname(struct aim_ssi_item *list, const char *sn); faim_export int aim_ssi_getpermdeny(struct aim_ssi_item *list); faim_export fu32_t aim_ssi_getpresence(struct aim_ssi_item *list); -faim_export char *aim_ssi_getalias(struct aim_ssi_item *list, char *gn, char *sn); +faim_export char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn); /* Client functions for changing SSI data */ faim_export int aim_ssi_addbuddy(aim_session_t *sess, aim_conn_t *conn, const char *name, const char *group, const char *alias, const char *comment, const char *smsnum, int needauth);
--- a/src/protocols/oscar/ssi.c Wed Jan 08 01:56:03 2003 +0000 +++ b/src/protocols/oscar/ssi.c Wed Jan 08 02:14:37 2003 +0000 @@ -412,7 +412,7 @@ * alias, or NULL if the buddy has no alias. You should free * this returned value! */ -faim_export char *aim_ssi_getalias(struct aim_ssi_item *list, char *gn, char *sn) +faim_export char *aim_ssi_getalias(struct aim_ssi_item *list, const char *gn, const char *sn) { struct aim_ssi_item *cur = aim_ssi_itemlist_finditem(list, gn, sn, AIM_SSI_TYPE_BUDDY); if (cur) { @@ -459,12 +459,12 @@ * buddy ID#s, which makes things more efficient. I think. */ - /* Deletions */ + /* Additions */ if (!sess->ssi.pending) { - for (cur1=sess->ssi.official; cur1; cur1=cur1->next) { - if (!aim_ssi_itemlist_find(sess->ssi.local, cur1->gid, cur1->bid)) { + for (cur1=sess->ssi.local; cur1; cur1=cur1->next) { + if (!aim_ssi_itemlist_find(sess->ssi.official, cur1->gid, cur1->bid)) { new = (struct aim_ssi_tmp *)malloc(sizeof(struct aim_ssi_tmp)); - new->action = AIM_CB_SSI_DEL; + new->action = AIM_CB_SSI_ADD; new->ack = 0xffff; new->name = NULL; new->item = cur1; @@ -478,12 +478,12 @@ } } - /* Additions */ + /* Deletions */ if (!sess->ssi.pending) { - for (cur1=sess->ssi.local; cur1; cur1=cur1->next) { - if (!aim_ssi_itemlist_find(sess->ssi.official, cur1->gid, cur1->bid)) { + for (cur1=sess->ssi.official; cur1; cur1=cur1->next) { + if (!aim_ssi_itemlist_find(sess->ssi.local, cur1->gid, cur1->bid)) { new = (struct aim_ssi_tmp *)malloc(sizeof(struct aim_ssi_tmp)); - new->action = AIM_CB_SSI_ADD; + new->action = AIM_CB_SSI_DEL; new->ack = 0xffff; new->name = NULL; new->item = cur1; @@ -862,8 +862,8 @@ */ faim_export int aim_ssi_movebuddy(aim_session_t *sess, aim_conn_t *conn, const char *oldgn, const char *newgn, const char *sn) { + aim_ssi_addbuddy(sess, conn, sn, newgn, aim_ssi_getalias(sess->ssi.local, oldgn, sn), NULL, NULL, 0); aim_ssi_delbuddy(sess, conn, sn, oldgn); - aim_ssi_addbuddy(sess, conn, sn, newgn, NULL, NULL, NULL, 0); return 0; }