Mercurial > pidgin.yaz
diff src/protocols/oscar/ssi.c @ 4292:78a3d2caf84c
[gaim-migrate @ 4545]
Better alias synchronization, as well as a rare crash fix
(when changing the alias of buddies that you are awaiting
authorization from).
I'll get rid of those annoying auth dialogs at signon
tomorrow. I hope.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 11 Jan 2003 08:40:25 +0000 |
parents | aa20cc16dc08 |
children | 22ebfa41525a |
line wrap: on
line diff
--- a/src/protocols/oscar/ssi.c Sat Jan 11 08:22:26 2003 +0000 +++ b/src/protocols/oscar/ssi.c Sat Jan 11 08:40:25 2003 +0000 @@ -1410,17 +1410,17 @@ cur->item = NULL; } else if (cur->action == AIM_CB_SSI_MOD) { - /* Replace the official item with the item in the local list */ + /* Replace the local item with the item from the official list */ struct aim_ssi_item *cur1; - if ((cur1 = aim_ssi_itemlist_find(sess->ssi.local, cur->item->gid, cur->item->bid))) { - free(cur1->name); - if (cur->item->name) { - cur1->name = (char *)malloc((strlen(cur->item->name)+1)*sizeof(char)); - strcpy(cur1->name, cur->item->name); + if ((cur1 = aim_ssi_itemlist_find(sess->ssi.official, cur->item->gid, cur->item->bid))) { + free(cur->item->name); + if (cur1->name) { + cur->item->name = (char *)malloc((strlen(cur1->name)+1)*sizeof(char)); + strcpy(cur->item->name, cur1->name); } else - cur1->name = NULL; - aim_freetlvchain(&cur1->data); - cur1->data = aim_tlvlist_copy(cur->item->data); + cur->item->name = NULL; + aim_freetlvchain(&cur->item->data); + cur->item->data = aim_tlvlist_copy(cur1->data); } } else if (cur->action == AIM_CB_SSI_DEL) { @@ -1431,11 +1431,11 @@ } else { /* Do the exact opposite */ if (cur->action == AIM_CB_SSI_ADD) { - /* Add the item to the official list */ + /* Add the local item to the official list */ aim_ssi_itemlist_add(&sess->ssi.official, cur->item->name, cur->item->gid, cur->item->bid, cur->item->type, cur->item->data); } else if (cur->action == AIM_CB_SSI_MOD) { - /* Replace the old item with the new item in the items list */ + /* Replace the official item with the item from the local list */ struct aim_ssi_item *cur1; if ((cur1 = aim_ssi_itemlist_find(sess->ssi.official, cur->item->gid, cur->item->bid))) { free(cur1->name); @@ -1449,7 +1449,7 @@ } } else if (cur->action == AIM_CB_SSI_DEL) { - /* Remove the item from the items list */ + /* Remove the item from the official list */ aim_ssi_itemlist_del(&sess->ssi.official, cur->item); cur->item = NULL; }