pidgin: 28e51e0d: Make it more explicit that incoming and ...
qulogic at pidgin.im
qulogic at pidgin.im
Fri May 21 18:02:42 EDT 2010
-----------------------------------------------------------------
Revision: 28e51e0dc9190233c38e7770f5cb48b697cf73cc
Ancestor: 90f93e7d8fe9b42284c5193f3e57b1196a08bfc7
Author: qulogic at pidgin.im
Date: 2010-05-21T07:36:59
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/28e51e0dc9190233c38e7770f5cb48b697cf73cc
Modified files:
libpurple/protocols/msn/directconn.c
libpurple/protocols/msn/directconn.h
libpurple/protocols/msn/slp.c
ChangeLog:
Make it more explicit that incoming and outgoing timeouts are different.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/directconn.c 39973eb77ccdf164e69d05ced18da7022f8db575
+++ libpurple/protocols/msn/directconn.c 2922a521caa99af48b8a0e8bf6987d870901880b
@@ -791,7 +791,7 @@ msn_dc_connected_to_peer_cb(gpointer dat
/*
* This callback will be called when we're the server
- * and nobody has connected us in DC_CONNECT_TIMEOUT seconds
+ * and nobody has connected us in DC_INCOMING_TIMEOUT seconds
*/
static gboolean
msn_dc_incoming_connection_timeout_cb(gpointer data) {
@@ -829,7 +829,7 @@ msn_dc_incoming_connection_timeout_cb(gp
/*
* This callback will be called when we're unable to connect to
- * the remote host in DC_CONNECT_TIMEOUT seconds.
+ * the remote host in DC_OUTGOING_TIMEOUT seconds.
*/
gboolean
msn_dc_outgoing_connection_timeout_cb(gpointer data)
@@ -863,7 +863,7 @@ msn_dc_outgoing_connection_timeout_cb(gp
if (dc->connect_data) {
dc->connect_timeout_handle = purple_timeout_add_seconds(
- DC_CONNECT_TIMEOUT,
+ DC_OUTGOING_TIMEOUT,
msn_dc_outgoing_connection_timeout_cb,
dc
);
@@ -888,7 +888,7 @@ msn_dc_outgoing_connection_timeout_cb(gp
/*
* This callback will be called when we're the server
- * and somebody has connected to us in DC_CONNECT_TIMEOUT seconds.
+ * and somebody has connected to us in DC_INCOMING_TIMEOUT seconds.
*/
static void
msn_dc_incoming_connection_cb(gpointer data, gint listenfd, PurpleInputCondition cond)
@@ -951,7 +951,7 @@ msn_dc_listen_socket_created_cb(int list
dc
);
dc->connect_timeout_handle = purple_timeout_add_seconds(
- DC_CONNECT_TIMEOUT * 2, /* Internal + external connection attempts */
+ DC_INCOMING_TIMEOUT,
msn_dc_incoming_connection_timeout_cb,
dc
);
============================================================
--- libpurple/protocols/msn/directconn.h 7560777e15c1e4dc878a261b8b6f005065772f66
+++ libpurple/protocols/msn/directconn.h bb94233564ce3f1762be07f0cb34d9fd827d3a69
@@ -114,8 +114,12 @@ struct _MsnDirectConn
//int num_calls; /**< The number of slpcalls using this direct connection */
};
-#define DC_CONNECT_TIMEOUT 5
-#define DC_TIMEOUT 60
+/* Outgoing attempt */
+#define DC_OUTGOING_TIMEOUT (5)
+/* Time for internal + external connection attempts */
+#define DC_INCOMING_TIMEOUT (DC_OUTGOING_TIMEOUT * 3)
+/* Timeout for lack of activity */
+#define DC_TIMEOUT (60)
/*
* Queues an MSN message to be sent via direct connection.
============================================================
--- libpurple/protocols/msn/slp.c 1a072a522bd52d5bcfd43c95d3e0580fcb40d018
+++ libpurple/protocols/msn/slp.c d99df3c32a3419134b4c8f0c5cb807a8cc2b8076
@@ -424,7 +424,7 @@ msn_slp_process_transresp(MsnSlpCall *sl
if (dc->connect_data) {
/* Add connect timeout handle */
dc->connect_timeout_handle = purple_timeout_add_seconds(
- DC_CONNECT_TIMEOUT,
+ DC_OUTGOING_TIMEOUT,
msn_dc_outgoing_connection_timeout_cb,
dc
);
More information about the Commits
mailing list