changeset 2919:22aefb8de0cb

[gaim-migrate @ 2932] jeez, i'm just undoing everything i did today, aren't i committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 22 Dec 2001 08:11:11 +0000
parents 4df759d607f3
children 4ed6fb39870b
files src/protocols/oscar/aim.h src/protocols/oscar/ft.c src/protocols/oscar/info.c
diffstat 3 files changed, 8 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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 <config.h>
 #endif
--- 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);