updates.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 14 Nov 2001 21:45:49 +0000 (21:45 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 14 Nov 2001 21:45:49 +0000 (21:45 +0000)
CHANGES
apps/irssi/src/silc/core/silc-core.c
lib/silcclient/client.c
lib/silcclient/silcapi.h

diff --git a/CHANGES b/CHANGES
index 88ca9bec61e565ca9dadf66e7acd08ded5a0525d..cdb6e907bf5e1716218a5e532ade70450c610e9e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,14 @@
+Wed Nov 14 23:44:56 EET 2001  Pekka Riikonen <priikone@silcnet.org>
+
+       * 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 <priikone@silcnet.org>
 
        * __pid_t -> pid_t in lib/silccrypt/silcrng.c.  A patch by
index c5de944d277d58deed15866bd91b1276ad7b08ec..3dddc6e44c6a2795acbc4bf33bb045c72a236b8f 100644 (file)
@@ -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;
 }
 
index 305e9c7df5fed223785f7a7e3264285b904c0129..7f1731dc54ac7589c9490a7ebf31b7c684719d4d 100644 (file)
@@ -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)
 {
index 155ea2da6f62af066d8fea7fe23a74d5fef9f588..61587e3d118f50fc17250c2539d0328d64ff8ad2 100644 (file)
@@ -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