[ekg2-commit] r4205 - trunk/plugins/icq: trunk/plugins/icq/icq_snac_handlers_01service.c trunk/plugins/icq/icq_snac_handlers_03buddy.c trunk/plugins/icq/icq_snac_handlers_13userlist.c trunk/plugins/icq/misc.c trunk/plugins/icq/misc.h

SVN commit svn w toxygen.net
Czw, 7 Sie 2008, 11:48:33 CEST


Author: wiechu
Date: 2008-08-07 11:48:33 +0200 (Thu, 07 Aug 2008)
New Revision: 4205

Modified:
   trunk/plugins/icq/icq_snac_handlers_01service.c
   trunk/plugins/icq/icq_snac_handlers_03buddy.c
   trunk/plugins/icq/icq_snac_handlers_13userlist.c
   trunk/plugins/icq/misc.c
   trunk/plugins/icq/misc.h
Log:
    - add comments
    - fix mistyped function name

Modified: trunk/plugins/icq/icq_snac_handlers_01service.c
===================================================================
--- trunk/plugins/icq/icq_snac_handlers_01service.c	2008-08-07 08:39:37 UTC (rev 4204)
+++ trunk/plugins/icq/icq_snac_handlers_01service.c	2008-08-07 09:48:33 UTC (rev 4205)
@@ -274,17 +274,17 @@
 	for (t = tlvs; t; t = t->next) {
 		switch (t->type) {
 			case 0x03:
-				if (tvl_length_check("icq_snac_service_reqinfo()", t, 4)) goto def;
+				if (tlv_length_check("icq_snac_service_reqinfo()", t, 4)) goto def;
 				debug_white("icq_snac_service_reqinfo() Logon TS: %u\n", t->nr);
 				break;
 
 			case 0x05:
-				if (tvl_length_check("icq_snac_service_reqinfo()", t, 4)) goto def;
+				if (tlv_length_check("icq_snac_service_reqinfo()", t, 4)) goto def;
 				debug_white("icq_snac_service_reqinfo() ICQ Member since: %u\n", t->nr);
 				break;
 
 			case 0x0A:
-				if (tvl_length_check("icq_snac_service_reqinfo()", t, 4)) goto def;
+				if (tlv_length_check("icq_snac_service_reqinfo()", t, 4)) goto def;
 				debug_white("icq_snac_service_reqinfo() External IP: %u.%u.%u.%u\n", t->buf[0], t->buf[1], t->buf[2], t->buf[3]);
 				break;
 

Modified: trunk/plugins/icq/icq_snac_handlers_03buddy.c
===================================================================
--- trunk/plugins/icq/icq_snac_handlers_03buddy.c	2008-08-07 08:39:37 UTC (rev 4204)
+++ trunk/plugins/icq/icq_snac_handlers_03buddy.c	2008-08-07 09:48:33 UTC (rev 4205)
@@ -56,6 +56,7 @@
 	return 0;
 }
 
+
 SNAC_SUBHANDLER(icq_snac_buddy_online) {
 	/*
 	 * Handle SNAC(0x3,0xb) -- User online notification
@@ -81,7 +82,7 @@
 		/* darkjames said: "I don't trust anything. Wiechu, check t->len" */
 		switch (t->type) {
 			case 0x01:
-				if (tvl_length_check("icq_snac_buddy_online()", t, 2))
+				if (tlv_length_check("icq_snac_buddy_online()", t, 2))
 					continue;
 				break;
 			case 0x03:
@@ -89,7 +90,7 @@
 			case 0x06:
 			case 0x0a:
 			case 0x0f:
-				if (tvl_length_check("icq_snac_buddy_online()", t, 4))
+				if (tlv_length_check("icq_snac_buddy_online()", t, 4))
 					continue;
 				break;
 		}

Modified: trunk/plugins/icq/icq_snac_handlers_13userlist.c
===================================================================
--- trunk/plugins/icq/icq_snac_handlers_13userlist.c	2008-08-07 08:39:37 UTC (rev 4204)
+++ trunk/plugins/icq/icq_snac_handlers_13userlist.c	2008-08-07 09:48:33 UTC (rev 4205)
@@ -37,6 +37,9 @@
 }
 
 SNAC_SUBHANDLER(icq_snac_userlist_reply) {
+	/*
+	 * Handle SNAC(0x13,0x03)
+	 */
 	debug_error("icq_snac_userlist_reply() XXX\n");
 
 #if 0
@@ -234,6 +237,18 @@
 }
 
 SNAC_SUBHANDLER(icq_snac_userlist_roster) {
+	/*
+	 * Handle SNAC(0x13, 0x6) -- Server contact list reply
+	 *
+	 * This is the server reply to client roster requests: SNAC(13,04), SNAC(13,05).
+	 * 
+	 * Server can split up the roster in several parts. This is indicated with
+	 * SNAC flags bit 1 as usual, however the "SSI list last change time" only
+	 * exists in the last packet. And the "Number of items" field indicates the
+	 * number of items in the current packet, not the entire list.
+	 *
+	 */
+
 	struct {
 		uint8_t unk1;		/* empty */	/* possible version */
 		uint16_t count;		/* COUNT */

Modified: trunk/plugins/icq/misc.c
===================================================================
--- trunk/plugins/icq/misc.c	2008-08-07 08:39:37 UTC (rev 4204)
+++ trunk/plugins/icq/misc.c	2008-08-07 09:48:33 UTC (rev 4205)
@@ -458,7 +458,7 @@
 	}
 }
 
-int tvl_length_check(char *name, icq_tlv_t *t, int length) {
+int tlv_length_check(char *name, icq_tlv_t *t, int length) {
 	if (t->len == length)
 		return 0;
 

Modified: trunk/plugins/icq/misc.h
===================================================================
--- trunk/plugins/icq/misc.h	2008-08-07 08:39:37 UTC (rev 4204)
+++ trunk/plugins/icq/misc.h	2008-08-07 09:48:33 UTC (rev 4205)
@@ -47,6 +47,6 @@
 status_t icq2ekg_status(int icq_status);
 
 /* misc */
-int tvl_length_check(char *name, icq_tlv_t *t, int length);
+int tlv_length_check(char *name, icq_tlv_t *t, int length);
 
 #endif



Więcej informacji o liście dyskusyjnej ekg2-commit