X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilclog.c;h=d0bec0c1c4320c5e45cc7cec183f5614b0f4c6c9;hb=e7b6c157b80152bf9fb9266e6bdd93f9fb0db776;hp=56f5532c5dc9b534ce5ee36642dfbe3fe8db7bd7;hpb=93a05de95b0e82af83bfc3e0518d8f57b228ed62;p=silc.git diff --git a/lib/silcutil/silclog.c b/lib/silcutil/silclog.c index 56f5532c..d0bec0c1 100644 --- a/lib/silcutil/silclog.c +++ b/lib/silcutil/silclog.c @@ -183,7 +183,7 @@ void silc_log_output(SilcLogType type, char *string) if (!silclog.scheduled) { if (silclog.no_init == FALSE) { fprintf(stderr, - "Warning, trying to output without log files initialization, " + "Warning, log files not initialized, " "log output is going to stderr\n"); silclog.no_init = TRUE; } @@ -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);