# HG changeset patch # User Ethan Blanton # Date 1177280590 0 # Node ID c068b1fbbb75d2e3454704216ce90a0b52c36196 # Parent 03532b86c20ff42d28606dbc0efacb000d3c16a5# Parent c5a8103aa9a49c6ecd41a992da073373eb40cdf0 merge of '0367c7ba68e12f430c7443660ff965ebdd118a75' and '0e6091a497349da7fcdf1042cf96ec8e9369ee80' diff -r c5a8103aa9a4 -r c068b1fbbb75 libpurple/protocols/oscar/family_feedbag.c --- a/libpurple/protocols/oscar/family_feedbag.c Sun Apr 22 21:29:07 2007 +0000 +++ b/libpurple/protocols/oscar/family_feedbag.c Sun Apr 22 22:23:10 2007 +0000 @@ -1043,13 +1043,14 @@ if (!od) return -EINVAL; - /* Make sure the master group exists */ - if (aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000) == NULL) - aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL); + /* Find the PDINFO item, or add it if it does not exist */ + if (!(tmp = aim_ssi_itemlist_finditem(od->ssi.local, NULL, NULL, AIM_SSI_TYPE_PDINFO))) { + /* Make sure the master group exists */ + if (aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000) == NULL) + aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL); - /* Find the PDINFO item, or add it if it does not exist */ - if (!(tmp = aim_ssi_itemlist_finditem(od->ssi.local, NULL, NULL, AIM_SSI_TYPE_PDINFO))) tmp = aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0xFFFF, AIM_SSI_TYPE_PDINFO, NULL); + } /* Need to add the 0x00ca TLV to the TLV chain */ aim_tlvlist_replace_8(&tmp->data, 0x00ca, permdeny); @@ -1079,12 +1080,12 @@ if (!od || !iconsum || !iconsumlen) return -EINVAL; - /* Make sure the master group exists */ - if (aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000) == NULL) - aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL); - /* Find the ICONINFO item, or add it if it does not exist */ if (!(tmp = aim_ssi_itemlist_finditem(od->ssi.local, NULL, "1", AIM_SSI_TYPE_ICONINFO))) { + /* Make sure the master group exists */ + if (aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000) == NULL) + aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL); + tmp = aim_ssi_itemlist_add(&od->ssi.local, "1", 0x0000, 0xFFFF, AIM_SSI_TYPE_ICONINFO, NULL); } @@ -1136,13 +1137,14 @@ if (!od) return -EINVAL; - /* Make sure the master group exists */ - if (aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000) == NULL) - aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL); + /* Find the PRESENCEPREFS item, or add it if it does not exist */ + if (!(tmp = aim_ssi_itemlist_finditem(od->ssi.local, NULL, NULL, AIM_SSI_TYPE_PRESENCEPREFS))) { + /* Make sure the master group exists */ + if (aim_ssi_itemlist_find(od->ssi.local, 0x0000, 0x0000) == NULL) + aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0x0000, AIM_SSI_TYPE_GROUP, NULL); - /* Find the PRESENCEPREFS item, or add it if it does not exist */ - if (!(tmp = aim_ssi_itemlist_finditem(od->ssi.local, NULL, NULL, AIM_SSI_TYPE_PRESENCEPREFS))) tmp = aim_ssi_itemlist_add(&od->ssi.local, NULL, 0x0000, 0xFFFF, AIM_SSI_TYPE_PRESENCEPREFS, NULL); + } /* Need to add the x00c9 TLV to the TLV chain */ aim_tlvlist_replace_32(&tmp->data, 0x00c9, presence);