libpurple/protocols/silc/silc.c

changeset 38433
361c801c4536
parent 38358
30ba44276e74
child 38841
518362268798
equal deleted inserted replaced
38431:71898cf4d20f 38433:361c801c4536
219 } 219 }
220 } else { 220 } else {
221 /* Add timeout */ 221 /* Add timeout */
222 ptask = silc_calloc(1, sizeof(*ptask)); 222 ptask = silc_calloc(1, sizeof(*ptask));
223 ptask->sg = sg; 223 ptask->sg = sg;
224 ptask->tag = purple_timeout_add((seconds * 1000) + 224 ptask->tag = g_timeout_add((seconds * 1000) +
225 (useconds / 1000), 225 (useconds / 1000),
226 silcpurple_scheduler_timeout, 226 silcpurple_scheduler_timeout,
227 ptask); 227 ptask);
228 silc_dlist_add(sg->tasks, ptask); 228 silc_dlist_add(sg->tasks, ptask);
229 } 229 }
644 return; 644 return;
645 } 645 }
646 646
647 #if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1) 647 #if __SILC_TOOLKIT_VERSION < SILC_VERSION(1,1,1)
648 /* Schedule SILC using Glib's event loop */ 648 /* Schedule SILC using Glib's event loop */
649 sg->scheduler = purple_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client); 649 sg->scheduler = g_timeout_add(300, (GSourceFunc)silcpurple_scheduler, client);
650 #else 650 #else
651 /* Run SILC scheduler */ 651 /* Run SILC scheduler */
652 sg->tasks = silc_dlist_init(); 652 sg->tasks = silc_dlist_init();
653 silc_schedule_set_notify(client->schedule, silcpurple_scheduler, 653 silc_schedule_set_notify(client->schedule, silcpurple_scheduler,
654 client); 654 client);
721 } 721 }
722 silc_dlist_uninit(sg->tasks); 722 silc_dlist_uninit(sg->tasks);
723 #endif /* __SILC_TOOLKIT_VERSION */ 723 #endif /* __SILC_TOOLKIT_VERSION */
724 724
725 if (sg->scheduler) 725 if (sg->scheduler)
726 purple_timeout_remove(sg->scheduler); 726 g_source_remove(sg->scheduler);
727 727
728 purple_debug_info("silc", "Scheduling destruction of SilcPurple %p\n", sg); 728 purple_debug_info("silc", "Scheduling destruction of SilcPurple %p\n", sg);
729 purple_timeout_add(1, (GSourceFunc)silcpurple_close_final, sg); 729 g_timeout_add(1, (GSourceFunc)silcpurple_close_final, sg);
730 } 730 }
731 731
732 732
733 /****************************** Protocol Actions *****************************/ 733 /****************************** Protocol Actions *****************************/
734 734

mercurial