Mercurial > pidgin.yaz
comparison libpurple/protocols/silc/silc.c @ 17699:2217b738a890
300 milliseconds apparently works on win32 for the SILC scheduler, let's
try this everywhere else too.
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Mon, 04 Jun 2007 02:46:05 +0000 |
parents | ae7a4134e499 |
children | 0f4a562b38d1 |
comparison
equal
deleted
inserted
replaced
17698:8ff4b838790a | 17699:2217b738a890 |
---|---|
117 SilcPurple sg = gc->proto_data; | 117 SilcPurple sg = gc->proto_data; |
118 silc_client_send_packet(sg->client, sg->conn, SILC_PACKET_HEARTBEAT, | 118 silc_client_send_packet(sg->client, sg->conn, SILC_PACKET_HEARTBEAT, |
119 NULL, 0); | 119 NULL, 0); |
120 } | 120 } |
121 | 121 |
122 static int | 122 static gboolean |
123 silcpurple_scheduler(gpointer *context) | 123 silcpurple_scheduler(gpointer *context) |
124 { | 124 { |
125 SilcPurple sg = (SilcPurple)context; | 125 SilcPurple sg = (SilcPurple)context; |
126 silc_client_run_one(sg->client); | 126 silc_client_run_one(sg->client); |
127 return 1; | 127 return TRUE; |
128 } | 128 } |
129 | 129 |
130 static void | 130 static void |
131 silcpurple_nickname_parse(const char *nickname, | 131 silcpurple_nickname_parse(const char *nickname, |
132 char **ret_nickname) | 132 char **ret_nickname) |
359 purple_connection_error(gc, _("Unable to create connection")); | 359 purple_connection_error(gc, _("Unable to create connection")); |
360 return; | 360 return; |
361 } | 361 } |
362 | 362 |
363 /* Schedule SILC using Glib's event loop */ | 363 /* Schedule SILC using Glib's event loop */ |
364 #ifndef _WIN32 | |
365 sg->scheduler = g_timeout_add(50, (GSourceFunc)silcpurple_scheduler, sg); | |
366 #else | |
367 sg->scheduler = g_timeout_add(300, (GSourceFunc)silcpurple_scheduler, sg); | 364 sg->scheduler = g_timeout_add(300, (GSourceFunc)silcpurple_scheduler, sg); |
368 #endif | |
369 } | 365 } |
370 | 366 |
371 static int | 367 static int |
372 silcpurple_close_final(gpointer *context) | 368 silcpurple_close_final(gpointer *context) |
373 { | 369 { |