# HG changeset patch # User Mark Doliner # Date 1216621986 0 # Node ID e8bea84f63b6028755aa7639a3d136853619aec6 # Parent 60030a36506e999678f6fc8870b7fe500c0ac0cd# Parent 8dcd6c1b923c8846d876fc67949058c0eedb2ad7 merge of '88c7f87fb5a74f975cf06c472059ecf081c54042' and 'fe134224188f83f69a5367395922807444d46f49' diff -r 60030a36506e -r e8bea84f63b6 libpurple/protocols/oscar/family_icq.c --- a/libpurple/protocols/oscar/family_icq.c Sun Jul 20 22:21:27 2008 +0000 +++ b/libpurple/protocols/oscar/family_icq.c Mon Jul 21 06:33:06 2008 +0000 @@ -218,7 +218,7 @@ byte_stream_putle16(&bs, 0x04b2); /* shrug. */ byte_stream_putle32(&bs, atoi(uin)); - flap_connection_send_snac_with_priority(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs, /* High priority? */ FALSE); + flap_connection_send_snac_with_priority(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x0000, snacid, &bs, FALSE); byte_stream_destroy(&bs); @@ -503,7 +503,7 @@ byte_stream_put16(&bs, strlen(uin)); byte_stream_putstr(&bs, uin); - flap_connection_send_snac_with_priority(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x000, snacid, &bs, /* High priority? */ FALSE); + flap_connection_send_snac_with_priority(od, conn, SNAC_FAMILY_ICQ, 0x0002, 0x000, snacid, &bs, FALSE); byte_stream_destroy(&bs); diff -r 60030a36506e -r e8bea84f63b6 libpurple/protocols/oscar/flap_connection.c --- a/libpurple/protocols/oscar/flap_connection.c Sun Jul 20 22:21:27 2008 +0000 +++ b/libpurple/protocols/oscar/flap_connection.c Mon Jul 21 06:33:06 2008 +0000 @@ -109,7 +109,10 @@ /* * Attempt to send the contents of a given queue - * @result TRUE if the queue was completely emptied or was iniitally empty; FALSE if rate limiting prevented it from being emptied + * + * @return TRUE if the queue was completely emptied or was initially + * empty; FALSE if rate limiting prevented it from being + * emptied. */ static gboolean flap_connection_send_snac_queue(FlapConnection *conn, struct timeval now, GQueue *queue) { @@ -131,7 +134,7 @@ if (new_current < rateclass->alert + 100) /* Not ready to send this SNAC yet--keep waiting. */ return FALSE; - + rateclass->current = new_current; rateclass->last.tv_sec = now.tv_sec; rateclass->last.tv_usec = now.tv_usec; @@ -165,7 +168,7 @@ return FALSE; } } - + /* We couldn't send all our SNACs. Keep trying */ return TRUE; } @@ -178,7 +181,9 @@ * * @param data The optional bytestream that makes up the data portion * of this SNAC. For empty SNACs this should be NULL. - * @param high_priority If TRUE, the SNAC will be queued normally if needed. If FALSE, it wil be queued separately, to be sent only if all high priority SNACs have been sent. + * @param high_priority If TRUE, the SNAC will be queued normally if + * needed. If FALSE, it wil be queued separately, to be sent + * only if all high priority SNACs have been sent. */ void flap_connection_send_snac_with_priority(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data, gboolean high_priority) @@ -239,7 +244,7 @@ if (high_priority) { if (!conn->queued_snacs) conn->queued_snacs = g_queue_new(); - g_queue_push_tail(conn->queued_snacs, queued_snac); + g_queue_push_tail(conn->queued_snacs, queued_snac); } else { if (!conn->queued_lowpriority_snacs) conn->queued_lowpriority_snacs = g_queue_new(); @@ -258,7 +263,7 @@ void flap_connection_send_snac(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data) { - flap_connection_send_snac_with_priority(od, conn, family, subtype, flags, snacid, data, /* High priority? */ TRUE); + flap_connection_send_snac_with_priority(od, conn, family, subtype, flags, snacid, data, TRUE); } /** @@ -1048,4 +1053,3 @@ sendframe_flap(conn, frame); flap_frame_destroy(frame); } - diff -r 60030a36506e -r e8bea84f63b6 libpurple/protocols/oscar/oscar.h --- a/libpurple/protocols/oscar/oscar.h Sun Jul 20 22:21:27 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.h Mon Jul 21 06:33:06 2008 +0000 @@ -630,7 +630,7 @@ void flap_connection_send_version(OscarData *od, FlapConnection *conn); void flap_connection_send_version_with_cookie(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy); void flap_connection_send_snac(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data); -void flap_connection_send_snac_with_high_priority(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data, gboolean high_priority); +void flap_connection_send_snac_with_priority(OscarData *od, FlapConnection *conn, guint16 family, const guint16 subtype, guint16 flags, aim_snacid_t snacid, ByteStream *data, gboolean high_priority); void flap_connection_send_keepalive(OscarData *od, FlapConnection *conn); FlapFrame *flap_frame_new(OscarData *od, guint16 channel, int datalen);