Added SILC Server library.
[silc.git] / lib / silcutil / silclog.c
index 2955a5dd761e2203ebb3196dc945871487eb5f4b..53f70919e5b3ad0bbf6cc5786ad3db56226c196f 100644 (file)
@@ -18,7 +18,7 @@
 */
 /* $Id$ */
 
-#include "silcincludes.h"
+#include "silc.h"
 
 /* SilcLogSettings context */
 typedef struct {
@@ -146,9 +146,8 @@ SILC_TASK_CALLBACK(silc_log_fflush_callback)
 
   if (silclog.flushdelay < 2)
     silclog.flushdelay = 2;
-  silc_schedule_task_add(context, 0, silc_log_fflush_callback, context,
-                        silclog.flushdelay, 0, SILC_TASK_TIMEOUT,
-                        SILC_TASK_PRI_NORMAL);
+  silc_schedule_task_add_timeout(context, silc_log_fflush_callback, context,
+                                silclog.flushdelay, 0);
 }
 
 /* Output log message to log file */
@@ -217,7 +216,7 @@ void silc_log_output(SilcLogType type, char *string)
 
 /* Set and initialize the specified log file. */
 
-bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize,
+SilcBool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize,
                       SilcSchedule scheduler)
 {
   FILE *fp = NULL;
@@ -264,8 +263,8 @@ bool silc_log_set_file(SilcLogType type, char *filename, SilcUInt32 maxsize,
   /* Add flush timeout */
   if (scheduler) {
     silc_schedule_task_del_by_callback(scheduler, silc_log_fflush_callback);
-    silc_schedule_task_add(scheduler, 0, silc_log_fflush_callback, scheduler,
-                          10, 0, SILC_TASK_TIMEOUT, SILC_TASK_PRI_NORMAL);
+    silc_schedule_task_add_timeout(scheduler, silc_log_fflush_callback,
+                                  scheduler, 10, 0);
     silclog.scheduled = TRUE;
   }
 
@@ -407,7 +406,7 @@ void silc_log_set_debug_string(const char *debug_string)
 
 /* Set timestamp */
 
-void silc_log_timestamp(bool enable)
+void silc_log_timestamp(SilcBool enable)
 {
   silclog.timestamp = enable;
 }
@@ -421,21 +420,21 @@ void silc_log_flushdelay(SilcUInt32 flushdelay)
 
 /* Set quick logging */
 
-void silc_log_quick(bool enable)
+void silc_log_quick(SilcBool enable)
 {
   silclog.quick = enable;
 }
 
 /* Set debugging */
 
-void silc_log_debug(bool enable)
+void silc_log_debug(SilcBool enable)
 {
   silclog.debug = enable;
 }
 
 /* Set debug hexdump */
 
-void silc_log_debug_hexdump(bool enable)
+void silc_log_debug_hexdump(SilcBool enable)
 {
   silclog.debug_hexdump = enable;
 }