Mercurial > pidgin
changeset 16302:03532b86c20f
merge of '1fec4b7f300a8ab8b7036a98e8ecc90808bbe5ca'
and '795a3d9baa3c96bae20af1c1bfa0b7179c0cac99'
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 22 Apr 2007 18:20:05 +0000 |
parents | aae14296a349 (diff) 3453edd4f703 (current diff) |
children | c068b1fbbb75 6a974950d2a8 2149a071e8d2 8c89913276b3 |
files | |
diffstat | 1 files changed, 16 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_feedbag.c Sun Apr 22 17:59:19 2007 +0000 +++ b/libpurple/protocols/oscar/family_feedbag.c Sun Apr 22 18:20:05 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);