diff libgaim/protocols/oscar/flap_connection.c @ 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 6cc89a43bf8f
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);
 }