Mercurial > pidgin.yaz
changeset 23623:38a30596ff49
This looks good to me. I'm thinking we probably don't want to get
into the habit of documenting parameters when we make function calls...
that could lead to a lot of documenting. Somehow the header file
had the wrong name for this. And then some other whitespace/comment
changes.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 20 Jul 2008 19:44:24 +0000 |
parents | e53a21941d43 |
children | 8dcd6c1b923c |
files | libpurple/protocols/oscar/family_icq.c libpurple/protocols/oscar/flap_connection.c libpurple/protocols/oscar/oscar.h |
diffstat | 3 files changed, 13 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_icq.c Sun Jul 20 05:53:00 2008 +0000 +++ b/libpurple/protocols/oscar/family_icq.c Sun Jul 20 19:44:24 2008 +0000 @@ -214,7 +214,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); @@ -497,7 +497,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);
--- a/libpurple/protocols/oscar/flap_connection.c Sun Jul 20 05:53:00 2008 +0000 +++ b/libpurple/protocols/oscar/flap_connection.c Sun Jul 20 19:44:24 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(); @@ -1048,4 +1053,3 @@ sendframe_flap(conn, frame); flap_frame_destroy(frame); } -
--- a/libpurple/protocols/oscar/oscar.h Sun Jul 20 05:53:00 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.h Sun Jul 20 19:44:24 2008 +0000 @@ -626,7 +626,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);