Mercurial > pidgin
comparison src/server.c @ 8273:f24172f53650
[gaim-migrate @ 8997]
This is Scott Lamb's eventloop abstraction patch. If it breaks things,
Scott Lamb will be glad to take the punishment. If it doesn't, it should
make integration into other event loops easier. Well, no, not easier,
harder actually, but it'll be done more appropriately and less hackily..
er, hacky. Is hackily a word?
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 17 Feb 2004 02:17:48 +0000 |
parents | 1fa30b3f7e6d |
children | ef881489396e |
comparison
equal
deleted
inserted
replaced
8272:9af78e73f0b2 | 8273:f24172f53650 |
---|---|
85 | 85 |
86 static void update_keepalive(GaimConnection *gc, gboolean on) | 86 static void update_keepalive(GaimConnection *gc, gboolean on) |
87 { | 87 { |
88 if (on && !gc->keep_alive) { | 88 if (on && !gc->keep_alive) { |
89 gaim_debug(GAIM_DEBUG_INFO, "server", "allowing NOP\n"); | 89 gaim_debug(GAIM_DEBUG_INFO, "server", "allowing NOP\n"); |
90 gc->keep_alive = g_timeout_add(60000, send_keepalive, gc); | 90 gc->keep_alive = gaim_timeout_add(60000, send_keepalive, gc); |
91 } else if (!on && gc->keep_alive > 0) { | 91 } else if (!on && gc->keep_alive > 0) { |
92 gaim_debug(GAIM_DEBUG_INFO, "server", "removing NOP\n"); | 92 gaim_debug(GAIM_DEBUG_INFO, "server", "removing NOP\n"); |
93 g_source_remove(gc->keep_alive); | 93 g_source_remove(gc->keep_alive); |
94 gc->keep_alive = 0; | 94 gc->keep_alive = 0; |
95 } | 95 } |
152 } | 152 } |
153 | 153 |
154 if (gc->idle_timer > 0) | 154 if (gc->idle_timer > 0) |
155 g_source_remove(gc->idle_timer); | 155 g_source_remove(gc->idle_timer); |
156 | 156 |
157 gc->idle_timer = g_timeout_add(20000, check_idle, gc); | 157 gc->idle_timer = gaim_timeout_add(20000, check_idle, gc); |
158 serv_touch_idle(gc); | 158 serv_touch_idle(gc); |
159 | 159 |
160 /* Move this hack into toc.c */ | 160 /* Move this hack into toc.c */ |
161 if (prpl_info->options & OPT_PROTO_CORRECT_TIME) | 161 if (prpl_info->options & OPT_PROTO_CORRECT_TIME) |
162 serv_add_buddy(gc, | 162 serv_add_buddy(gc, |
217 GSList *tmp; | 217 GSList *tmp; |
218 struct last_auto_response *lar; | 218 struct last_auto_response *lar; |
219 | 219 |
220 /* because we're modifying or creating a lar, schedule the | 220 /* because we're modifying or creating a lar, schedule the |
221 * function to expire them as the pref dictates */ | 221 * function to expire them as the pref dictates */ |
222 g_timeout_add((gaim_prefs_get_int("/core/away/auto_response/sec_before_resend") + 1) * 1000, | 222 gaim_timeout_add((gaim_prefs_get_int("/core/away/auto_response/sec_before_resend") + 1) * 1000, |
223 expire_last_auto_responses, NULL); | 223 expire_last_auto_responses, NULL); |
224 | 224 |
225 tmp = last_auto_responses; | 225 tmp = last_auto_responses; |
226 | 226 |
227 while (tmp) { | 227 while (tmp) { |