comparison 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
comparison
equal deleted inserted replaced
15107:f41cd6f78c60 15108:917a50335af3
815 flap_connection_schedule_destroy(conn, 815 flap_connection_schedule_destroy(conn,
816 OSCAR_DISCONNECT_INVALID_DATA, NULL); 816 OSCAR_DISCONNECT_INVALID_DATA, NULL);
817 break; 817 break;
818 } 818 }
819 819
820 /* TODO: Verify the sequence number sent by the server. */ 820 /* Verify the sequence number sent by the server. */
821 #if 0
822 /* TODO: Need to initialize conn->seqnum_in somewhere before we can use this. */
823 if (aimutil_get16(&header[1]) != conn->seqnum_in++)
824 {
825 /* Received an out-of-order FLAP! */
826 flap_connection_schedule_destroy(conn,
827 OSCAR_DISCONNECT_INVALID_DATA, NULL);
828 break;
829 }
830 #endif
821 831
822 /* Initialize a new temporary FlapFrame for incoming data */ 832 /* Initialize a new temporary FlapFrame for incoming data */
823 conn->buffer_incoming.channel = aimutil_get8(&header[1]); 833 conn->buffer_incoming.channel = aimutil_get8(&header[1]);
824 conn->buffer_incoming.seqnum = aimutil_get16(&header[2]); 834 conn->buffer_incoming.seqnum = aimutil_get16(&header[2]);
825 conn->buffer_incoming.data.len = aimutil_get16(&header[4]); 835 conn->buffer_incoming.data.len = aimutil_get16(&header[4]);
956 } 966 }
957 967
958 void 968 void
959 flap_connection_send(FlapConnection *conn, FlapFrame *frame) 969 flap_connection_send(FlapConnection *conn, FlapFrame *frame)
960 { 970 {
961 frame->seqnum = ++(conn->seqnum); 971 frame->seqnum = ++(conn->seqnum_out);
962 sendframe_flap(conn, frame); 972 sendframe_flap(conn, frame);
963 flap_frame_destroy(frame); 973 flap_frame_destroy(frame);
964 } 974 }
965 975