From ac7152fa2b1835af4a3eb3e845e9e918ae3f1161 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Wed, 14 Nov 2001 21:45:49 +0000 Subject: [PATCH] updates. --- CHANGES | 11 +++++++++++ apps/irssi/src/silc/core/silc-core.c | 2 +- lib/silcclient/client.c | 14 ++++++++++++++ lib/silcclient/silcapi.h | 19 +++++++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 88ca9bec..cdb6e907 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,14 @@ +Wed Nov 14 23:44:56 EET 2001 Pekka Riikonen + + * Added silc_client_run_one into lib/silcclient/silcapi.h and + lib/silcclient/client.c. This function is used when the SILC + Client is run under some other scheduler, or event loop or + main loop. On GUI applications, for example this may be + desired to used to run the client under the GUI application's + main loop. Typically the GUI application would register an + idle task that calls this function multiple times in a second + to quickly process the SILC specific data. + Wed Nov 14 16:22:25 EET 2001 Pekka Riikonen * __pid_t -> pid_t in lib/silccrypt/silcrng.c. A patch by diff --git a/apps/irssi/src/silc/core/silc-core.c b/apps/irssi/src/silc/core/silc-core.c index c5de944d..3dddc6e4 100644 --- a/apps/irssi/src/silc/core/silc-core.c +++ b/apps/irssi/src/silc/core/silc-core.c @@ -67,7 +67,7 @@ uint32 sims_count = 0; static int my_silc_scheduler(void) { - silc_schedule_one(silc_client->schedule, 0); + silc_client_run_one(silc_client); return 1; } diff --git a/lib/silcclient/client.c b/lib/silcclient/client.c index 305e9c7d..7f1731dc 100644 --- a/lib/silcclient/client.c +++ b/lib/silcclient/client.c @@ -148,6 +148,20 @@ void silc_client_run(SilcClient client) silc_schedule(client->schedule); } +/* Runs the client and returns immeadiately. This function is used when + the SILC Client object indicated by the `client' is run under some + other scheduler, or event loop or main loop. On GUI applications, + for example this may be desired to use to run the client under the + GUI application's main loop. Typically the GUI application would + register an idle task that calls this function multiple times in + a second to quickly process the SILC specific data. */ + +void silc_client_run_one(SilcClient client) +{ + /* Run the scheduler once. */ + silc_schedule_one(client->schedule, 0); +} + static void silc_client_entry_destructor(SilcIDCache cache, SilcIDCacheEntry entry) { diff --git a/lib/silcclient/silcapi.h b/lib/silcclient/silcapi.h index 155ea2da..61587e3d 100644 --- a/lib/silcclient/silcapi.h +++ b/lib/silcclient/silcapi.h @@ -533,6 +533,25 @@ int silc_client_init(SilcClient client); ***/ void silc_client_run(SilcClient client); +/****f* silcclient/SilcClientAPI/silc_client_run_one + * + * SYNOPSIS + * + * void silc_client_run_one(SilcClient client); + * + * DESCRIPTION + * + * Runs the client and returns immeadiately. This function is used when + * the SILC Client object indicated by the `client' is run under some + * other scheduler, or event loop or main loop. On GUI applications, + * for example this may be desired to used to run the client under the + * GUI application's main loop. Typically the GUI application would + * register an idle task that calls this function multiple times in + * a second to quickly process the SILC specific data. + * + ***/ +void silc_client_run_one(SilcClient client); + /****f* silcclient/SilcClientAPI/silc_client_stop * * SYNOPSIS -- 2.24.0