# HG changeset patch # User Eric Warmenhoven # Date 1009008671 0 # Node ID 22aefb8de0cb9c90e6b9fd33cd021039e433901f # Parent 4df759d607f3b98da43e454af4a5efa1d8edf3f6 [gaim-migrate @ 2932] jeez, i'm just undoing everything i did today, aren't i committer: Tailor Script diff -r 4df759d607f3 -r 22aefb8de0cb src/protocols/oscar/aim.h --- a/src/protocols/oscar/aim.h Sat Dec 22 08:08:37 2001 +0000 +++ b/src/protocols/oscar/aim.h Sat Dec 22 08:11:11 2001 +0000 @@ -857,7 +857,6 @@ #define AIM_GETINFO_GENERALINFO 0x00001 #define AIM_GETINFO_AWAYMESSAGE 0x00003 -#define AIM_GETINFO_CAPABILITIES 0x0004 struct aim_invite_priv { char *sn; diff -r 4df759d607f3 -r 22aefb8de0cb src/protocols/oscar/ft.c --- a/src/protocols/oscar/ft.c Sat Dec 22 08:08:37 2001 +0000 +++ b/src/protocols/oscar/ft.c Sat Dec 22 08:11:11 2001 +0000 @@ -4,7 +4,6 @@ */ #define FAIM_INTERNAL - #ifdef HAVE_CONFIG_H #include #endif diff -r 4df759d607f3 -r 22aefb8de0cb src/protocols/oscar/info.c --- a/src/protocols/oscar/info.c Sat Dec 22 08:08:37 2001 +0000 +++ b/src/protocols/oscar/info.c Sat Dec 22 08:11:11 2001 +0000 @@ -23,6 +23,9 @@ if (!sess || !conn || !sn) return -EINVAL; + if ((infotype != AIM_GETINFO_GENERALINFO) && (infotype != AIM_GETINFO_AWAYMESSAGE)) + return -EINVAL; + if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 12+1+strlen(sn)))) return -ENOMEM; @@ -598,8 +601,7 @@ inforeq = (struct aim_priv_inforeq *)origsnac->data; if ((inforeq->infotype != AIM_GETINFO_GENERALINFO) && - (inforeq->infotype != AIM_GETINFO_AWAYMESSAGE) && - (inforeq->infotype != AIM_GETINFO_CAPABILITIES)) { + (inforeq->infotype != AIM_GETINFO_AWAYMESSAGE)) { faimdprintf(sess, 0, "parse_userinfo_middle: unknown infotype in request! (0x%04x)\n", inforeq->infotype); return 0; } @@ -612,30 +614,18 @@ * Depending on what informational text was requested, different * TLVs will appear here. * - * Profile will be 1 and 2, away message will be 3 and 4, caps - * will be 5. + * Profile will be 1 and 2, away message will be 3 and 4. */ - if (inforeq->infotype == AIM_GETINFO_GENERALINFO) { + if (aim_gettlv(tlvlist, 0x0001, 1)) { text_encoding = aim_gettlv_str(tlvlist, 0x0001, 1); text = aim_gettlv_str(tlvlist, 0x0002, 1); - } else if (inforeq->infotype == AIM_GETINFO_AWAYMESSAGE) { + } else if (aim_gettlv(tlvlist, 0x0003, 1)) { text_encoding = aim_gettlv_str(tlvlist, 0x0003, 1); text = aim_gettlv_str(tlvlist, 0x0004, 1); - } else if (inforeq->infotype == AIM_GETINFO_CAPABILITIES) { - aim_tlv_t *ct; - - if ((ct = aim_gettlv(tlvlist, 0x0005, 1))) { - aim_bstream_t cbs; - - aim_bstream_init(&cbs, ct->value, ct->length); - - userinfo.capabilities = aim_getcap(sess, &cbs, ct->length); - userinfo.capspresent = 1; - } } if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) - ret = userfunc(sess, rx, &userinfo, inforeq->infotype, text_encoding, text); + ret = userfunc(sess, rx, &userinfo, text_encoding, text, inforeq->infotype); free(text_encoding); free(text);