changeset 15108:917a50335af3

[gaim-migrate @ 17893] Minor documentation changes committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 04 Dec 2006 11:36:31 +0000
parents f41cd6f78c60
children 24b19f0d25de
files libgaim/protocols/oscar/flap_connection.c libgaim/protocols/oscar/oft.c libgaim/protocols/oscar/oscar.h
diffstat 3 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/protocols/oscar/flap_connection.c	Mon Dec 04 11:14:11 2006 +0000
+++ b/libgaim/protocols/oscar/flap_connection.c	Mon Dec 04 11:36:31 2006 +0000
@@ -817,7 +817,17 @@
 				break;
 			}
 
-			/* TODO: Verify the sequence number sent by the server. */
+			/* Verify the sequence number sent by the server. */
+#if 0
+			/* TODO: Need to initialize conn->seqnum_in somewhere before we can use this. */
+			if (aimutil_get16(&header[1]) != conn->seqnum_in++)
+			{
+				/* Received an out-of-order FLAP! */
+				flap_connection_schedule_destroy(conn,
+						OSCAR_DISCONNECT_INVALID_DATA, NULL);
+				break;
+			}
+#endif
 
 			/* Initialize a new temporary FlapFrame for incoming data */
 			conn->buffer_incoming.channel = aimutil_get8(&header[1]);
@@ -958,7 +968,7 @@
 void
 flap_connection_send(FlapConnection *conn, FlapFrame *frame)
 {
-	frame->seqnum = ++(conn->seqnum);
+	frame->seqnum = ++(conn->seqnum_out);
 	sendframe_flap(conn, frame);
 	flap_frame_destroy(frame);
 }
--- a/libgaim/protocols/oscar/oft.c	Mon Dec 04 11:14:11 2006 +0000
+++ b/libgaim/protocols/oscar/oft.c	Mon Dec 04 11:36:31 2006 +0000
@@ -550,7 +550,7 @@
 /* End GaimXfer callbacks for use when sending and receiving       */
 /*******************************************************************/
 
-#if 0
+#ifdef TODOFT
 /*
  * This little area in oscar.c is the nexus of file transfer code,
  * so I wrote a little explanation of what happens.  I am such a
--- a/libgaim/protocols/oscar/oscar.h	Mon Dec 04 11:14:11 2006 +0000
+++ b/libgaim/protocols/oscar/oscar.h	Mon Dec 04 11:36:31 2006 +0000
@@ -389,7 +389,8 @@
 
 	guint16 type;
 	guint16 subtype;
-	guint16 seqnum; /**< The sequence number of most recent outgoing packet. */
+	guint16 seqnum_out; /**< The sequence number of most recently sent packet. */
+	guint16 seqnum_in; /**< The sequence number of most recently received packet. */
 	GSList *groups;
 	GSList *rateclasses; /* Contains nodes of struct rateclass. */
 
@@ -502,6 +503,7 @@
 		gboolean in_transaction;
 	} ssi;
 
+	/** Contains pointers to handler functions for each family/subtype. */
 	GHashTable *handlerlist;
 
 	/** A linked list containing FlapConnections. */