Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
4291:7d3c552c4a89 | 4292:78a3d2caf84c |
---|---|
1408 } | 1408 } |
1409 aim_ssi_itemlist_del(&sess->ssi.local, cur->item); | 1409 aim_ssi_itemlist_del(&sess->ssi.local, cur->item); |
1410 cur->item = NULL; | 1410 cur->item = NULL; |
1411 | 1411 |
1412 } else if (cur->action == AIM_CB_SSI_MOD) { | 1412 } else if (cur->action == AIM_CB_SSI_MOD) { |
1413 /* Replace the official item with the item in the local list */ | 1413 /* Replace the local item with the item from the official list */ |
1414 struct aim_ssi_item *cur1; | 1414 struct aim_ssi_item *cur1; |
1415 if ((cur1 = aim_ssi_itemlist_find(sess->ssi.local, cur->item->gid, cur->item->bid))) { | 1415 if ((cur1 = aim_ssi_itemlist_find(sess->ssi.official, cur->item->gid, cur->item->bid))) { |
1416 free(cur1->name); | 1416 free(cur->item->name); |
1417 if (cur->item->name) { | 1417 if (cur1->name) { |
1418 cur1->name = (char *)malloc((strlen(cur->item->name)+1)*sizeof(char)); | 1418 cur->item->name = (char *)malloc((strlen(cur1->name)+1)*sizeof(char)); |
1419 strcpy(cur1->name, cur->item->name); | 1419 strcpy(cur->item->name, cur1->name); |
1420 } else | 1420 } else |
1421 cur1->name = NULL; | 1421 cur->item->name = NULL; |
1422 aim_freetlvchain(&cur1->data); | 1422 aim_freetlvchain(&cur->item->data); |
1423 cur1->data = aim_tlvlist_copy(cur->item->data); | 1423 cur->item->data = aim_tlvlist_copy(cur1->data); |
1424 } | 1424 } |
1425 | 1425 |
1426 } else if (cur->action == AIM_CB_SSI_DEL) { | 1426 } else if (cur->action == AIM_CB_SSI_DEL) { |
1427 /* Add the item back into the local list */ | 1427 /* Add the item back into the local list */ |
1428 aim_ssi_itemlist_add(&sess->ssi.local, cur->item->name, cur->item->gid, cur->item->bid, cur->item->type, cur->item->data); | 1428 aim_ssi_itemlist_add(&sess->ssi.local, cur->item->name, cur->item->gid, cur->item->bid, cur->item->type, cur->item->data); |
1429 } | 1429 } |
1430 | 1430 |
1431 } else { | 1431 } else { |
1432 /* Do the exact opposite */ | 1432 /* Do the exact opposite */ |
1433 if (cur->action == AIM_CB_SSI_ADD) { | 1433 if (cur->action == AIM_CB_SSI_ADD) { |
1434 /* Add the item to the official list */ | 1434 /* Add the local item to the official list */ |
1435 aim_ssi_itemlist_add(&sess->ssi.official, cur->item->name, cur->item->gid, cur->item->bid, cur->item->type, cur->item->data); | 1435 aim_ssi_itemlist_add(&sess->ssi.official, cur->item->name, cur->item->gid, cur->item->bid, cur->item->type, cur->item->data); |
1436 | 1436 |
1437 } else if (cur->action == AIM_CB_SSI_MOD) { | 1437 } else if (cur->action == AIM_CB_SSI_MOD) { |
1438 /* Replace the old item with the new item in the items list */ | 1438 /* Replace the official item with the item from the local list */ |
1439 struct aim_ssi_item *cur1; | 1439 struct aim_ssi_item *cur1; |
1440 if ((cur1 = aim_ssi_itemlist_find(sess->ssi.official, cur->item->gid, cur->item->bid))) { | 1440 if ((cur1 = aim_ssi_itemlist_find(sess->ssi.official, cur->item->gid, cur->item->bid))) { |
1441 free(cur1->name); | 1441 free(cur1->name); |
1442 if (cur->item->name) { | 1442 if (cur->item->name) { |
1443 cur1->name = (char *)malloc((strlen(cur->item->name)+1)*sizeof(char)); | 1443 cur1->name = (char *)malloc((strlen(cur->item->name)+1)*sizeof(char)); |
1447 aim_freetlvchain(&cur1->data); | 1447 aim_freetlvchain(&cur1->data); |
1448 cur1->data = aim_tlvlist_copy(cur->item->data); | 1448 cur1->data = aim_tlvlist_copy(cur->item->data); |
1449 } | 1449 } |
1450 | 1450 |
1451 } else if (cur->action == AIM_CB_SSI_DEL) { | 1451 } else if (cur->action == AIM_CB_SSI_DEL) { |
1452 /* Remove the item from the items list */ | 1452 /* Remove the item from the official list */ |
1453 aim_ssi_itemlist_del(&sess->ssi.official, cur->item); | 1453 aim_ssi_itemlist_del(&sess->ssi.official, cur->item); |
1454 cur->item = NULL; | 1454 cur->item = NULL; |
1455 } | 1455 } |
1456 | 1456 |
1457 } | 1457 } |