pidgin: 3e0de710: This looks good to me. I'm thinking we ...

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Jul 21 02:51:18 EDT 2008


-----------------------------------------------------------------
Revision: 3e0de710384530497e5dea7172858b6546d0d83b
Ancestor: 12b9c02788253d50b8dbabc5e2c9c42c9ae2bd7e
Author: markdoliner at pidgin.im
Date: 2008-07-20T19:44:24
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3e0de710384530497e5dea7172858b6546d0d83b

Modified files:
        libpurple/protocols/oscar/family_icq.c
        libpurple/protocols/oscar/flap_connection.c
        libpurple/protocols/oscar/oscar.h

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/family_icq.c	13e35ab10874b0bc607b81c49fb99130394c4c47
+++ libpurple/protocols/oscar/family_icq.c	8151d2a4165d3990fe73c0ae8f920ad3dfe9c183
@@ -214,7 +214,7 @@ int aim_icq_getallinfo(OscarData *od, co
 	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 @@ int aim_icq_getstatusnote(OscarData *od,
 	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);
 
============================================================
--- libpurple/protocols/oscar/flap_connection.c	31fde6497cfb7f60805b9d4cd9adb530a71bd782
+++ libpurple/protocols/oscar/flap_connection.c	ea868b89de9948346a25d9637ceeb644c4da4e70
@@ -109,7 +109,10 @@ rateclass_get_new_current(FlapConnection
 
 /*
  * 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 @@ static gboolean flap_connection_send_sna
 			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 @@ static gboolean flap_connection_send_que
 			return FALSE;
 		}
 	}
-	
+
 	/* We couldn't send all our SNACs. Keep trying */
 	return TRUE;
 }
@@ -178,7 +181,9 @@ static gboolean flap_connection_send_que
  *
  * @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 @@ flap_connection_send_snac_with_priority(
 		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 @@ flap_connection_send(FlapConnection *con
 	sendframe_flap(conn, frame);
 	flap_frame_destroy(frame);
 }
-
============================================================
--- libpurple/protocols/oscar/oscar.h	f45b3ed6f71c21ae20838f95c3b7515f61948fb1
+++ libpurple/protocols/oscar/oscar.h	b836b35a19beac100b399ebc3378cb429a33b197
@@ -626,7 +626,7 @@ void flap_connection_send_snac(OscarData
 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);
 


More information about the Commits mailing list