changeset 4317:7c9f3d0fe8b2

[gaim-migrate @ 4571] Eh, nothing really. Very minor clean up stuff. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 16 Jan 2003 00:49:15 +0000
parents c5851f0e120e
children 5f0385678315
files src/protocols/oscar/aim.h src/protocols/oscar/auth.c src/protocols/oscar/oscar.c src/protocols/oscar/ssi.c src/protocols/oscar/tlv.c
diffstat 5 files changed, 20 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/aim.h	Wed Jan 15 00:18:16 2003 +0000
+++ b/src/protocols/oscar/aim.h	Thu Jan 16 00:49:15 2003 +0000
@@ -231,6 +231,15 @@
 	"us", "en", \
 }
 
+#define CLIENTINFO_Netscape_7_0_1 { \
+	"Netscape 2000 an approved user of AOL Instant Messenger (SM)", \
+	0x1d0d, \
+	0x0007, 0x0000, \
+	0x0001, 0x0000, \
+	0x00000058, \
+	"us", "en", \
+}
+
 #define CLIENTINFO_AIM_KNOWNGOOD CLIENTINFO_AIM_5_1_3036
 #define CLIENTINFO_ICQ_KNOWNGOOD CLIENTINFO_ICQ_5_45_3777
 
--- a/src/protocols/oscar/auth.c	Wed Jan 15 00:18:16 2003 +0000
+++ b/src/protocols/oscar/auth.c	Thu Jan 16 00:49:15 2003 +0000
@@ -267,11 +267,13 @@
 	aim_addtlvtochain_raw(&tl, 0x000e, strlen(ci->country), ci->country);
 	aim_addtlvtochain_raw(&tl, 0x000f, strlen(ci->lang), ci->lang);
 
+#ifndef NOSSI
 	/*
 	 * If set, old-fashioned buddy lists will not work. You will need
 	 * to use SSI.
 	 */
 	aim_addtlvtochain8(&tl, 0x004a, 0x01);
+#endif
 
 	aim_writetlvchain(&fr->data, &tl);
 
@@ -401,6 +403,7 @@
 	 *   Not available for ICQ or @mac.com logins.
 	 *   If you receive this TLV, then you are allowed to use 
 	 *   family 0x0018 to check the status of your email.
+	 * XXX - Not really true!
 	 */
 	if (aim_gettlv(tlvlist, 0x0011, 1))
 		info->email = aim_gettlv_str(tlvlist, 0x0011, 1);
--- a/src/protocols/oscar/oscar.c	Wed Jan 15 00:18:16 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Thu Jan 16 00:49:15 2003 +0000
@@ -4078,7 +4078,8 @@
 
 	debug_printf("ssi rights:");
 	for (i=0; i<numtypes; i++)
-		debug_printf(" max type %d = %hu, ", i, maxitems[i]);
+		debug_printf(" max type 0x%04x = %hx, ", i, maxitems[i]);
+	debug_printf("\n");
 
 	if (numtypes >= 0)
 		od->rights.maxbuddies = maxitems[0];
@@ -4201,7 +4202,6 @@
 		GSList *cur;
 
 		/* Buddies */
-		cur = gc->groups;
 		for (cur=gc->groups; cur; cur=g_slist_next(cur)) {
 			GSList *curb;
 			struct group *group = cur->data;
--- a/src/protocols/oscar/ssi.c	Wed Jan 15 00:18:16 2003 +0000
+++ b/src/protocols/oscar/ssi.c	Thu Jan 16 00:49:15 2003 +0000
@@ -1155,7 +1155,7 @@
 	/* Read in the timestamp */
 	sess->ssi.timestamp = aimbs_get32(bs);
 
-	if (snac->flags ^ 0x0001) {
+	if (!(snac->flags & 0x0001)) {
 		/* Make a copy of the list */
 		struct aim_ssi_item *cur;
 		for (cur=sess->ssi.official; cur; cur=cur->next)
--- a/src/protocols/oscar/tlv.c	Wed Jan 15 00:18:16 2003 +0000
+++ b/src/protocols/oscar/tlv.c	Thu Jan 16 00:49:15 2003 +0000
@@ -115,9 +115,6 @@
  *        but the chain is not at the end of the SNAC, and the chain is 
  *        preceeded by the number of TLVs.  So you can limit that with this.
  *
- * AAA - Change this.  It would never need to read in unlimited, right?
- * That's what aim_readtlvchain() is for.  Dumb ass.
- *
  * Reads and parses a series of TLV patterns from a data buffer; the
  * returned structure is manipulatable with the rest of the TLV
  * routines.  When done with a TLV chain, aim_freetlvchain() should
@@ -133,7 +130,7 @@
 faim_internal aim_tlvlist_t *aim_readtlvchain_num(aim_bstream_t *bs, fu16_t num)
 {
 	aim_tlvlist_t *list = NULL, *cur;
-	
+
 	while ((aim_bstream_empty(bs) > 0) && (num != 0)) {
 		fu16_t type, length;
 
@@ -161,7 +158,7 @@
 		}
 		cur->tlv->type = type;
 		if ((cur->tlv->length = length)) {
-		       cur->tlv->value = aimbs_getraw(bs, length);	
+		       cur->tlv->value = aimbs_getraw(bs, length);
 		       if (!cur->tlv->value) {
 			       freetlv(&cur->tlv);
 			       free(cur);
@@ -179,7 +176,7 @@
 }
 
 /**
- * aim_readtlvchain_num - Read a TLV chain from a buffer.
+ * aim_readtlvchain_len - Read a TLV chain from a buffer.
  * @param bs Input bstream
  * @param len The max length in bytes that will be read.
  *        There are a number of places where you want to read in a tlvchain, 
@@ -201,7 +198,7 @@
 faim_internal aim_tlvlist_t *aim_readtlvchain_len(aim_bstream_t *bs, fu16_t len)
 {
 	aim_tlvlist_t *list = NULL, *cur;
-	
+
 	while ((aim_bstream_empty(bs) > 0) && (len > 0)) {
 		fu16_t type, length;
 
@@ -229,7 +226,7 @@
 		}
 		cur->tlv->type = type;
 		if ((cur->tlv->length = length)) {
-		       cur->tlv->value = aimbs_getraw(bs, length);	
+		       cur->tlv->value = aimbs_getraw(bs, length);
 		       if (!cur->tlv->value) {
 			       freetlv(&cur->tlv);
 			       free(cur);