X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fsilclog.c;h=d0bec0c1c4320c5e45cc7cec183f5614b0f4c6c9;hb=e7b6c157b80152bf9fb9266e6bdd93f9fb0db776;hp=481dfccb2da60307361bade1483ed190f454dd9a;hpb=0d868f8c94519610b54ca5bbff995e595b91d28f;p=silc.git diff --git a/lib/silcutil/silclog.c b/lib/silcutil/silclog.c index 481dfccb..d0bec0c1 100644 --- a/lib/silcutil/silclog.c +++ b/lib/silcutil/silclog.c @@ -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);