libgaim/protocols/oscar/flap_connection.c

changeset 15169
5066b0eb6abf
parent 15168
4e604d302448
child 15172
8032180fbca3
--- 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);
 }

mercurial