changeset 4071:2532f1192da3

[gaim-migrate @ 4283] So I made all them versions be the likes of winaim 5.1.3036. This includes changing the ssi family/module version from 1 to 3. This caused the SNAC flag 0x8000 to pop up in a few places, so I made a change to rxhandlers.c that should take care of this. This should allow you to add @mac.com buddies to your buddy list, as well as get rid of the PleaseUpgrade000 buddies. It should also reduce your risk of cancer by 5-10%. Hopefully this won't break anything. Everything seems to be ok to me. Baaaaah. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 13 Dec 2002 22:34:14 +0000
parents 6efe00ee7de8
children 226f6871643c
files src/protocols/oscar/admin.c src/protocols/oscar/aim.h src/protocols/oscar/aim_internal.h src/protocols/oscar/bos.c src/protocols/oscar/buddylist.c src/protocols/oscar/chat.c src/protocols/oscar/chatnav.c src/protocols/oscar/icq.c src/protocols/oscar/im.c src/protocols/oscar/info.c src/protocols/oscar/invite.c src/protocols/oscar/rxhandlers.c src/protocols/oscar/search.c src/protocols/oscar/service.c src/protocols/oscar/ssi.c
diffstat 15 files changed, 32 insertions(+), 45 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/admin.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/admin.c	Fri Dec 13 22:34:14 2002 +0000
@@ -3,7 +3,7 @@
  *
  * Used for stuff like changing the formating of your screen name, changing your 
  * email address, requesting an account confirmation email, getting account info, 
- * 
+ *
  */
 
 #define FAIM_INTERNAL
@@ -227,8 +227,8 @@
 
 	mod->family = 0x0007;
 	mod->version = 0x0001;
-	mod->toolid = AIM_TOOL_NEWWIN;
-	mod->toolversion = 0x0361; /* XXX this and above aren't right */
+	mod->toolid = 0x0010;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "admin", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/aim.h	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/aim.h	Fri Dec 13 22:34:14 2002 +0000
@@ -218,7 +218,7 @@
 	"us", "en", \
 }
 
-#define CLIENTINFO_ICQ_5_45_1_3777_85 { \
+#define CLIENTINFO_ICQ_5_45_3777 { \
 	"ICQ Inc. - Product of ICQ (TM).2003a.5.45.1.3777.85", \
 	0x010a, \
 	0x0005, 0x002d, \
@@ -236,9 +236,8 @@
 	"us", "en", \
 }
 
-#define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_3_5_1670
-/* define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036 */
-#define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_4_65_3281
+#define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036
+#define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_5_45_3777
 
 #ifndef TRUE
 #define TRUE 1
--- a/src/protocols/oscar/aim_internal.h	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/aim_internal.h	Fri Dec 13 22:34:14 2002 +0000
@@ -149,21 +149,6 @@
 	fu16_t instance;
 };
 
-/* these are used by aim_*_clientready */
-#define AIM_TOOL_JAVA   0x0001
-#define AIM_TOOL_MAC    0x0002
-#define AIM_TOOL_WIN16  0x0003
-#define AIM_TOOL_WIN32  0x0004
-#define AIM_TOOL_MAC68K 0x0005
-#define AIM_TOOL_MACPPC 0x0006
-#define AIM_TOOL_NEWWIN 0x0010
-struct aim_tool_version {
-	fu16_t group;
-	fu16_t version;
-	fu16_t tool;
-	fu16_t toolversion;
-};
-
 /* 
  * In SNACland, the terms 'family' and 'group' are synonymous -- the former
  * is my term, the latter is AOL's.
--- a/src/protocols/oscar/bos.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/bos.c	Fri Dec 13 22:34:14 2002 +0000
@@ -155,7 +155,7 @@
 	mod->family = 0x0009;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
-	mod->toolversion = 0x047b;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "bos", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/buddylist.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/buddylist.c	Fri Dec 13 22:34:14 2002 +0000
@@ -269,7 +269,7 @@
 	mod->family = 0x0003;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
-	mod->toolversion = 0x047b;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "buddylist", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/chat.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/chat.c	Fri Dec 13 22:34:14 2002 +0000
@@ -702,8 +702,8 @@
 
 	mod->family = 0x000e;
 	mod->version = 0x0001;
-	mod->toolid = 0x0004; /* XXX this doesn't look right */
-	mod->toolversion = 0x0001; /* nor does this */
+	mod->toolid = 0x0010;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "chat", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/chatnav.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/chatnav.c	Fri Dec 13 22:34:14 2002 +0000
@@ -423,9 +423,9 @@
 {
 
 	mod->family = 0x000d;
-	mod->version = 0x0003;
+	mod->version = 0x0001;
 	mod->toolid = 0x0010;
-	mod->toolversion = 0x047c;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "chatnav", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/icq.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/icq.c	Fri Dec 13 22:34:14 2002 +0000
@@ -255,7 +255,7 @@
 	mod->family = 0x0015;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
-	mod->toolversion = 0x047b;
+	mod->toolversion = 0x047c;
 	mod->flags = 0;
 	strncpy(mod->name, "icq", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/im.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/im.c	Fri Dec 13 22:34:14 2002 +0000
@@ -2305,7 +2305,7 @@
 	mod->family = 0x0004;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
-	mod->toolversion = 0x047b;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "messaging", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/info.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/info.c	Fri Dec 13 22:34:14 2002 +0000
@@ -886,8 +886,8 @@
 
 	mod->family = 0x0002;
 	mod->version = 0x0001;
-	mod->toolid = 0x0101;
-	mod->toolversion = 0x047b;
+	mod->toolid = 0x0110;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "locate", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/invite.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/invite.c	Fri Dec 13 22:34:14 2002 +0000
@@ -25,7 +25,7 @@
 	mod->family = 0x0006;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
-	mod->toolversion = 0x047b;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "invite", sizeof(mod->name));
 	mod->snachandler = NULL;
--- a/src/protocols/oscar/rxhandlers.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/rxhandlers.c	Fri Dec 13 22:34:14 2002 +0000
@@ -108,6 +108,17 @@
 	snac.flags = aimbs_get16(&rx->data);
 	snac.id = aimbs_get32(&rx->data);
 
+	/* SNAC flags are apparently uniform across all SNACs, so we handle them here */
+	if (snac.flags & 0x8000) {
+		/* This contains the version of the family that this SNAC is in.  
+		 * You get this when your SSI module is version 2 or higher.  
+		 * For now we have no need for this, but you could always save 
+		 * it as a part of aim_modnsac_t, or something.  The format is...
+		 * 2 byte length of total mini-header, then TLV of  type 0x0001, 
+		 * length 0x0002, value is the 2 byte version number */
+		aim_bstream_advance(&rx->data, aimbs_get16(&rx->data));
+	}
+
 	for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) {
 
 		if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 
--- a/src/protocols/oscar/search.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/search.c	Fri Dec 13 22:34:14 2002 +0000
@@ -122,7 +122,7 @@
 	mod->family = 0x000a;
 	mod->version = 0x0001;
 	mod->toolid = 0x0110;
-	mod->toolversion = 0x047b;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "search", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/service.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/service.c	Fri Dec 13 22:34:14 2002 +0000
@@ -962,7 +962,7 @@
 	mod->family = 0x0001;
 	mod->version = 0x0003;
 	mod->toolid = 0x0110;
-	mod->toolversion = 0x047b;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "general", sizeof(mod->name));
 	mod->snachandler = snachandler;
--- a/src/protocols/oscar/ssi.c	Fri Dec 13 06:51:17 2002 +0000
+++ b/src/protocols/oscar/ssi.c	Fri Dec 13 22:34:14 2002 +0000
@@ -1224,14 +1224,6 @@
 	fu16_t revision;
 	fu32_t timestamp;
 
-	/* When you set the version for the SSI family to 2-4, the beginning of this changes.
-	 * Instead of the version and then the revision, there is "0x0006" and then a type 
-	 * 0x0001 TLV containing the 2 byte SSI family version that you sent earlier.  Also, 
-	 * the SNAC flags go from 0x0000 to 0x8000.  I guess the 0x0006 is the length of the 
-	 * TLV(s) that follow.  The rights SNAC does the same thing, with the differing flag 
-	 * and everything.
-	 */
-
 	fmtver = aimbs_get8(bs); /* Version of ssi data.  Should be 0x00 */
 	revision = aimbs_get16(bs); /* # of times ssi data has been modified */
 	if (revision != 0)
@@ -1430,9 +1422,9 @@
 {
 
 	mod->family = AIM_CB_FAM_SSI;
-	mod->version = 0x0001;
+	mod->version = 0x0003;
 	mod->toolid = 0x0110;
-	mod->toolversion = 0x047b;
+	mod->toolversion = 0x0629;
 	mod->flags = 0;
 	strncpy(mod->name, "ssi", sizeof(mod->name));
 	mod->snachandler = snachandler;