pidgin.2.5.6: 1fcba66f: applied changes from a336cc1fd3a1ce815f9...
elb at pidgin.im
elb at pidgin.im
Tue Apr 28 20:20:43 EDT 2009
-----------------------------------------------------------------
Revision: 1fcba66fbd836c93985c0490b29a1cd899ae1542
Ancestor: 30079f001fcf3d37b3b998c4d62f0c3c308346fc
Author: elb at pidgin.im
Date: 2009-04-28T20:57:59
Branch: im.pidgin.pidgin.2.5.6
URL: http://d.pidgin.im/viewmtn/revision/info/1fcba66fbd836c93985c0490b29a1cd899ae1542
Modified files:
ChangeLog libpurple/conversation.c
libpurple/plugins/filectl.c libpurple/plugins/joinpart.c
libpurple/protocols/irc/msgs.c
libpurple/protocols/jabber/buddy.c
libpurple/protocols/msnp9/httpconn.c
libpurple/protocols/msnp9/slp.c
libpurple/protocols/msnp9/slpcall.c
libpurple/protocols/msnp9/slpcall.h
libpurple/protocols/msnp9/transaction.c
libpurple/protocols/myspace/myspace.c
libpurple/protocols/myspace/myspace.h
libpurple/protocols/oscar/oscar.c
libpurple/protocols/oscar/peer.c
libpurple/protocols/sametime/sametime.c
libpurple/protocols/zephyr/zephyr.c
ChangeLog:
applied changes from a336cc1fd3a1ce815f97303b8d5ae8988f8cbd5b
through fe4f5d91d1605cf93c53470e59d4bf8da6c5c840
ChangeLog for the above.
-------------- next part --------------
============================================================
--- ChangeLog ca4283a2426da5e0d67bc3bf130882200c5b4a6b
+++ ChangeLog c2ec6d21ffd802be46ca57067c8a5bdb3917a053
@@ -2,6 +2,8 @@ version 2.5.6 (??/??/2009):
version 2.5.6 (??/??/2009):
libpurple:
+ * Improve sleep behavior by aggregation longer timeouts on second
+ boundaries to allow better power saving. (Arunan Balasubramaniam)
* Fix various crashes on exit.
IRC:
============================================================
--- libpurple/conversation.c 3bccc3746ca0b742de2278d36d977e4e1707df29
+++ libpurple/conversation.c 8bf92ab20e821ea58a9289a59e18d1ba2faff1e5
@@ -33,7 +33,7 @@
#include "signals.h"
#include "util.h"
-#define SEND_TYPED_TIMEOUT 5000
+#define SEND_TYPED_TIMEOUT_SECONDS 5
static GList *conversations = NULL;
static GList *ims = NULL;
@@ -1122,8 +1122,9 @@ purple_conv_im_start_send_typed_timeout(
{
g_return_if_fail(im != NULL);
- im->send_typed_timeout = purple_timeout_add(SEND_TYPED_TIMEOUT, send_typed_cb,
- purple_conv_im_get_conversation(im));
+ im->send_typed_timeout = purple_timeout_add_seconds(SEND_TYPED_TIMEOUT_SECONDS,
+ send_typed_cb,
+ purple_conv_im_get_conversation(im));
}
void
============================================================
--- libpurple/plugins/filectl.c 3663c344f6e2a9882fa17ee77fafeba92e9a4a20
+++ libpurple/plugins/filectl.c 23d49eb815d2987ec8ee8a32ece78be92a658291
@@ -220,7 +220,7 @@ plugin_load(PurplePlugin *plugin)
plugin_load(PurplePlugin *plugin)
{
init_file();
- check = purple_timeout_add(5000, (GSourceFunc)check_file, NULL);
+ check = purple_timeout_add_seconds(5, (GSourceFunc)check_file, NULL);
return TRUE;
}
============================================================
--- libpurple/plugins/joinpart.c 05c0e5ac8afef64171d2e1d44994fdec1914374e
+++ libpurple/plugins/joinpart.c 7c12cdc82b738b03dcd501505bfd302e0bce8595
@@ -194,7 +194,7 @@ static gboolean plugin_load(PurplePlugin
PURPLE_CALLBACK(received_chat_msg_cb), users);
/* Cleanup every 5 minutes */
- id = purple_timeout_add(1000 * 60 * 5, (GSourceFunc)clean_users_hash, users);
+ id = purple_timeout_add_seconds(60 * 5, (GSourceFunc)clean_users_hash, users);
data = g_new(gpointer, 2);
data[0] = users;
============================================================
--- libpurple/protocols/irc/msgs.c 984b5e0bc6275997ccbfd16c58ddf330dc86960e
+++ libpurple/protocols/irc/msgs.c 4f96457ea98a44c98745da1a2bfafff3c6bba1ab
@@ -117,7 +117,7 @@ static void irc_connected(struct irc_con
irc_blist_timeout(irc);
if (!irc->timer)
- irc->timer = purple_timeout_add(45000, (GSourceFunc)irc_blist_timeout, (gpointer)irc);
+ irc->timer = purple_timeout_add_seconds(45, (GSourceFunc)irc_blist_timeout, (gpointer)irc);
}
void irc_msg_default(struct irc_conn *irc, const char *name, const char *from, char **args)
============================================================
--- libpurple/protocols/jabber/buddy.c 9ff67c9f62fa077196d25f2e4458bfec2e759991
+++ libpurple/protocols/jabber/buddy.c f56534eec26e6b8776b4c47676676c0a762addb9
@@ -1775,7 +1775,7 @@ static void jabber_buddy_get_info_for_ji
}
js->pending_buddy_info_requests = g_slist_prepend(js->pending_buddy_info_requests, jbi);
- jbi->timeout_handle = purple_timeout_add(30000, jabber_buddy_get_info_timeout, jbi);
+ jbi->timeout_handle = purple_timeout_add_seconds(30, jabber_buddy_get_info_timeout, jbi);
}
void jabber_buddy_get_info(PurpleConnection *gc, const char *who)
============================================================
--- libpurple/protocols/msnp9/httpconn.c 31e00e6a8b2e1e4f1742af9e8ca6a5e5ea9abb22
+++ libpurple/protocols/msnp9/httpconn.c 5948049699e1b38cb71db67e07dea25423e7addb
@@ -703,7 +703,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(3, msn_httpconn_poll, httpconn);
msn_httpconn_process_queue(httpconn);
}
============================================================
--- libpurple/protocols/msnp9/slp.c 7cbd74e1d1abfe2207c5211295b4c9a9318f4ae2
+++ libpurple/protocols/msnp9/slp.c d9f32cedcbd873f775170b0d41200b327d359473
@@ -33,8 +33,8 @@
#include "smiley.h"
-/* ms to delay between sending buddy icon requests to the server. */
-#define BUDDY_ICON_DELAY 20000
+/* Seconds to delay between sending buddy icon requests to the server. */
+#define BUDDY_ICON_DELAY 20
static void send_ok(MsnSlpCall *slpcall, const char *branch,
const char *type, const char *content);
@@ -1058,8 +1058,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 seconds 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/msnp9/slpcall.c 700df0e754c850a4578a6f62dabe91b07a4bc9d9
+++ libpurple/protocols/msnp9/slpcall.c ef0face7ccf8153e3a58bda356cebbc87645a0b0
@@ -68,7 +68,7 @@ msn_slp_call_new(MsnSlpLink *slplink)
msn_slplink_add_slpcall(slplink, slpcall);
- slpcall->timer = purple_timeout_add(MSN_SLPCALL_TIMEOUT, msn_slp_call_timeout, slpcall);
+ slpcall->timer = purple_timeout_add_seconds(MSN_SLPCALL_TIMEOUT, msn_slp_call_timeout, slpcall);
return slpcall;
}
============================================================
--- libpurple/protocols/msnp9/slpcall.h a142eff835ceceff7c3c5136d36ad85503d744ec
+++ libpurple/protocols/msnp9/slpcall.h 8213f49f7c6fba6207109dd7a266be884417b234
@@ -33,7 +33,7 @@ typedef struct _MsnSlpCall MsnSlpCall;
#include "slpsession.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/msnp9/transaction.c 499cec7eb2dcb61d2f2b16270fb92a449e67bde5
+++ libpurple/protocols/msnp9/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
============================================================
--- libpurple/protocols/myspace/myspace.c b686a7392be3abd9c253c6fc455decd6726b3067
+++ libpurple/protocols/myspace/myspace.c 2cddce1882f370033f51a5683c446097447e04ff
@@ -1238,7 +1238,7 @@ gboolean msim_we_are_logged_on(MsimSessi
/* Disable due to problems with timeouts. TODO: fix. */
#ifdef MSIM_USE_KEEPALIVE
- purple_timeout_add(MSIM_KEEPALIVE_INTERVAL_CHECK,
+ purple_timeout_add_seconds(MSIM_KEEPALIVE_INTERVAL_CHECK,
(GSourceFunc)msim_check_alive, session);
#endif
============================================================
--- libpurple/protocols/myspace/myspace.h 578f4250226fe37a0fcc8f5efea159be88658e8e
+++ libpurple/protocols/myspace/myspace.h e294fc90345e61c08b02436888b9907794cc0605
@@ -114,8 +114,8 @@
#define MSIM_KEEPALIVE_INTERVAL (3 * 60)
/*#define MSIM_USE_KEEPALIVE*/
-/* Time to check if alive (milliseconds) */
-#define MSIM_KEEPALIVE_INTERVAL_CHECK (30 * 1000)
+/* Time to check if alive (seconds) */
+#define MSIM_KEEPALIVE_INTERVAL_CHECK 30
/* Time to check for new mail (milliseconds) */
#define MSIM_MAIL_INTERVAL_CHECK (60 * 1000)
============================================================
--- libpurple/protocols/oscar/oscar.c 399ab2ae8e442514cb9167a73b4d307ee82564f4
+++ libpurple/protocols/oscar/oscar.c 5f4b5d44258be75292f3c1e87f1aef4635b6141e
@@ -1266,7 +1266,7 @@ flap_connection_established_bos(OscarDat
aim_ssi_reqdata(od);
if (od->getblisttimer > 0)
purple_timeout_remove(od->getblisttimer);
- od->getblisttimer = purple_timeout_add(30000, purple_ssi_rerequestdata, od);
+ od->getblisttimer = purple_timeout_add_seconds(30, purple_ssi_rerequestdata, od);
aim_locate_reqrights(od);
aim_buddylist_reqrights(od, conn);
@@ -5031,7 +5031,7 @@ static int purple_ssi_parseerr(OscarData
_("The AIM servers were temporarily unable to send your buddy list. Your buddy list is not lost, and will probably become available in a few minutes."));
if (od->getblisttimer > 0)
purple_timeout_remove(od->getblisttimer);
- od->getblisttimer = purple_timeout_add(30000, purple_ssi_rerequestdata, od);
+ od->getblisttimer = purple_timeout_add_seconds(30, purple_ssi_rerequestdata, od);
return 1;
}
============================================================
--- libpurple/protocols/oscar/peer.c c784c82a95cf7574deb69aa985401009dee1d4b3
+++ libpurple/protocols/oscar/peer.c 042021b4669e048b3165c20fc9018d161dbbec12
@@ -812,7 +812,7 @@ peer_connection_trynext(PeerConnection *
(conn->client_connect_data != NULL))
{
/* Connecting... */
- conn->connect_timeout_timer = purple_timeout_add(5000,
+ conn->connect_timeout_timer = purple_timeout_add_seconds(5,
peer_connection_tooktoolong, conn);
return;
}
============================================================
--- libpurple/protocols/sametime/sametime.c ee32a4745fc76a4fe1905316783e5070222dd0b5
+++ libpurple/protocols/sametime/sametime.c b901f1f602f3384f332fac93c0994fa80f3af27c
@@ -809,7 +809,7 @@ static void blist_schedule(struct mwPurp
static void blist_schedule(struct mwPurplePluginData *pd) {
if(pd->save_event) return;
- pd->save_event = purple_timeout_add(BLIST_SAVE_SECONDS * 1000,
+ pd->save_event = purple_timeout_add_seconds(BLIST_SAVE_SECONDS,
blist_save_cb, pd);
}
============================================================
--- libpurple/protocols/zephyr/zephyr.c 4c61853cf1f5dd4145f6386e4b560ff4b196c379
+++ libpurple/protocols/zephyr/zephyr.c 10798247ed7f35087d18457246c65906be3176a1
@@ -1857,7 +1857,7 @@ static void zephyr_login(PurpleAccount *
} else if (use_tzc(zephyr)) {
zephyr->nottimer = purple_timeout_add(100, check_notify_tzc, gc);
}
- zephyr->loctimer = purple_timeout_add(20000, check_loc, gc);
+ zephyr->loctimer = purple_timeout_add_seconds(20, check_loc, gc);
}
More information about the Commits
mailing list