Changeset 6dc3757
- Timestamp:
- Jun 11, 2011, 6:31:32 PM (13 years ago)
- Children:
- 89fe67e
- Parents:
- db4f7c3
- git-author:
- David Benjamin <davidben@mit.edu> (05/23/11 23:43:21)
- git-committer:
- David Benjamin <davidben@mit.edu> (06/11/11 18:31:32)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
aim.c
rdc1edbd r6dc3757 113 113 } 114 114 115 void owl_aim_send_nop(owl_timer *t, void *data) { 116 if(owl_global_is_doaimevents(&g)) { 117 aim_session_t *sess = owl_global_get_aimsess(&g); 118 aim_flap_nop(sess, aim_getconn_type(sess, AIM_CONN_TYPE_BOS)); 119 } 115 gboolean owl_aim_send_nop(gpointer data) { 116 owl_global *g = data; 117 if (owl_global_is_doaimevents(g)) { 118 aim_session_t *sess = owl_global_get_aimsess(g); 119 aim_flap_nop(sess, aim_getconn_type(sess, AIM_CONN_TYPE_BOS)); 120 } 121 return TRUE; 120 122 } 121 123 … … 183 185 owl_function_debugmsg("owl_aim_login: connecting"); 184 186 185 g.aim_nop_timer = owl_select_add_timer("owl_aim_send_nop", 30, 30, owl_aim_send_nop, NULL, NULL);187 g.aim_nop_timer = g_timeout_add_seconds(30, owl_aim_send_nop, &g); 186 188 187 189 return(0); 188 190 } 189 191 190 static void owl_aim_unset_ignorelogin(owl_timer *t, void *data) 191 { 192 owl_global_unset_ignore_aimlogin(&g); 192 static gboolean owl_aim_unset_ignorelogin(void *data) 193 { 194 owl_global *g = data; 195 owl_global_unset_ignore_aimlogin(g); 196 return FALSE; /* only run once. */ 193 197 } 194 198 … … 209 213 /* start the ingorelogin timer */ 210 214 owl_global_set_ignore_aimlogin(&g); 211 owl_select_add_timer("owl_aim_unset_ignorelogin", 212 owl_global_get_aim_ignorelogin_timer(&g), 213 0, owl_aim_unset_ignorelogin, NULL, NULL); 215 g_timeout_add_seconds(owl_global_get_aim_ignorelogin_timer(&g), 216 owl_aim_unset_ignorelogin, &g); 214 217 215 218 /* aim_ssi_setpresence(owl_global_get_aimsess(&g), 0x00000400); */ … … 225 228 owl_global_set_aimnologgedin(&g); 226 229 owl_global_set_no_doaimevents(&g); 227 owl_select_remove_timer(g.aim_nop_timer); 230 if (g.aim_nop_timer) { 231 g_source_remove(g.aim_nop_timer); 232 g.aim_nop_timer = 0; 233 } 228 234 } 229 235 … … 244 250 owl_global_set_aimnologgedin(&g); 245 251 owl_global_set_no_doaimevents(&g); 246 owl_select_remove_timer(g.aim_nop_timer); 252 if (g.aim_nop_timer) { 253 g_source_remove(g.aim_nop_timer); 254 g.aim_nop_timer = 0; 255 } 247 256 } 248 257 -
owl.h
r33b6431b r6dc3757 627 627 owl_list io_dispatch_list; 628 628 GList *timerlist; 629 owl_timer *aim_nop_timer;629 guint aim_nop_timer; 630 630 int load_initial_subs; 631 631 FILE *debug_file;
Note: See TracChangeset
for help on using the changeset viewer.