pidgin: 7e2aa394: Use purple_timeout_add_seconds() instead...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Nov 13 03:38:30 EST 2008


-----------------------------------------------------------------
Revision: 7e2aa3946cbcbd81736f3653115a05c60432bc8a
Ancestor: d062629380817014178252b6476fb68091dd12ca
Author: markdoliner at pidgin.im
Date: 2008-11-13T08:26:12
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7e2aa3946cbcbd81736f3653115a05c60432bc8a

Modified files:
        libpurple/protocols/msn/httpconn.c
        libpurple/protocols/msn/slp.c
        libpurple/protocols/msn/slpcall.c
        libpurple/protocols/msn/slpcall.h
        libpurple/protocols/msn/soap.c
        libpurple/protocols/msn/transaction.c

ChangeLog: 

Use purple_timeout_add_seconds() instead of purple_timeout_add() in a
few places.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/httpconn.c	3e14d93685c2d06aa380d88916433a4618d29e28
+++ libpurple/protocols/msn/httpconn.c	33697704f65b7b68c3d42bbe9435f2693454f8f8
@@ -720,7 +720,7 @@ connect_cb(gpointer data, gint source, c
 		httpconn->inpa = purple_input_add(httpconn->fd, PURPLE_INPUT_READ,
 			read_cb, data);
 
-		httpconn->timer = purple_timeout_add(2000, msn_httpconn_poll, httpconn);
+		httpconn->timer = purple_timeout_add_seconds(2, msn_httpconn_poll, httpconn);
 
 		msn_httpconn_process_queue(httpconn);
 	}
============================================================
--- libpurple/protocols/msn/slp.c	87478502eaff198683ace4f38e3065f654af820d
+++ libpurple/protocols/msn/slp.c	1ec11be33bb2bd946e88d693e415c307afb8cdbc
@@ -33,7 +33,7 @@
 #include "smiley.h"
 
 /* ms to delay between sending buddy icon requests to the server. */
-#define BUDDY_ICON_DELAY 20000
+#define BUDDY_ICON_DELAY 20
 /*debug SLP*/
 #define MSN_DEBUG_UD
 
@@ -1057,8 +1057,8 @@ end_user_display(MsnSlpCall *slpcall, Ms
 		purple_timeout_remove(userlist->buddy_icon_request_timer);
 	}
 
-	/* Wait BUDDY_ICON_DELAY ms before freeing our window slot and requesting the next icon. */
-	userlist->buddy_icon_request_timer = purple_timeout_add(BUDDY_ICON_DELAY,
+	/* Wait BUDDY_ICON_DELAY s before freeing our window slot and requesting the next icon. */
+	userlist->buddy_icon_request_timer = purple_timeout_add_seconds(BUDDY_ICON_DELAY,
 														  msn_release_buddy_icon_request_timeout, userlist);
 }
 
============================================================
--- libpurple/protocols/msn/slpcall.c	46b8614abafb5c3e22efce82824b007b010f0bd6
+++ libpurple/protocols/msn/slpcall.c	c5004fb5cc7950e96d87bb09951d0a110e9cb8f2
@@ -72,7 +72,7 @@ msn_slpcall_new(MsnSlpLink *slplink)
 
 	msn_slplink_add_slpcall(slplink, slpcall);
 
-	slpcall->timer = purple_timeout_add(MSN_SLPCALL_TIMEOUT, msn_slpcall_timeout, slpcall);
+	slpcall->timer = purple_timeout_add_seconds(MSN_SLPCALL_TIMEOUT, msn_slpcall_timeout, slpcall);
 
 	return slpcall;
 }
============================================================
--- libpurple/protocols/msn/slpcall.h	365949c0302f0e030926d62a950df1eaba42c387
+++ libpurple/protocols/msn/slpcall.h	1bc5420bb50468f6c14c0e17726bea20320676de
@@ -32,7 +32,7 @@ typedef struct _MsnSlpCall MsnSlpCall;
 #include "slplink.h"
 
 /* The official client seems to timeout slp calls after 5 minutes */
-#define MSN_SLPCALL_TIMEOUT 300000
+#define MSN_SLPCALL_TIMEOUT 300
 
 typedef enum
 {
============================================================
--- libpurple/protocols/msn/soap.c	a76c96f6673d6797f67a0394f104fa21d4e166e9
+++ libpurple/protocols/msn/soap.c	90b3f30fb5c1af36e8b4e5d90cb61a049f6e7245
@@ -134,7 +134,7 @@ msn_soap_get_connection(MsnSession *sess
 	}
 
 	if (session->soap_cleanup_handle == 0)
-		session->soap_cleanup_handle = purple_timeout_add(SOAP_TIMEOUT * 1000,
+		session->soap_cleanup_handle = purple_timeout_add_seconds(SOAP_TIMEOUT,
 			msn_soap_cleanup_for_session, session);
 
 	if (conn == NULL) {
============================================================
--- libpurple/protocols/msn/transaction.c	499cec7eb2dcb61d2f2b16270fb92a449e67bde5
+++ libpurple/protocols/msn/transaction.c	32ca29afe98b81dafddf3cc5e1df68737b004ee0
@@ -211,7 +211,7 @@ msn_transaction_set_timeout_cb(MsnTransa
 		purple_timeout_remove(trans->timer);
 	}
 	trans->timeout_cb = cb;
-	trans->timer = purple_timeout_add(60000, transaction_timeout, trans);
+	trans->timer = purple_timeout_add_seconds(60, transaction_timeout, trans);
 }
 
 void


More information about the Commits mailing list