Added SILC Thread Queue API
[silc.git] / lib / silcutil / silclog.c
index 481dfccb2da60307361bade1483ed190f454dd9a..d0bec0c1c4320c5e45cc7cec183f5614b0f4c6c9 100644 (file)
@@ -243,6 +243,9 @@ SilcBool silc_log_set_file(SilcLogType type, char *filename,
   FILE *fp = NULL;
   SilcLog log;
 
+  if (!scheduler)
+    scheduler = silc_schedule_get_global();
+
   log = silc_log_get_context(type);
   if (!log)
     return FALSE;
@@ -424,7 +427,7 @@ void silc_log_set_debug_string(const char *debug_string)
   int len;
   if ((strchr(debug_string, '(') && strchr(debug_string, ')')) ||
       strchr(debug_string, '$'))
-    string = strdup(debug_string);
+    string = silc_strdup(debug_string);
   else
     string = silc_string_regexify(debug_string);
   len = strlen(string);