# HG changeset patch # User Mark Doliner # Date 1165232191 0 # Node ID 917a50335af3ecf2f1f88ea5fa43e8afa3bb2386 # Parent f41cd6f78c60d13888af38f702368650d02523f3 [gaim-migrate @ 17893] Minor documentation changes committer: Tailor Script diff -r f41cd6f78c60 -r 917a50335af3 libgaim/protocols/oscar/flap_connection.c --- 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); } diff -r f41cd6f78c60 -r 917a50335af3 libgaim/protocols/oscar/oft.c --- 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 diff -r f41cd6f78c60 -r 917a50335af3 libgaim/protocols/oscar/oscar.h --- 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. */