Commit 8ce0d753 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Use static in addition to thread_local in logging.c

parent bb5e205b
......@@ -54,7 +54,7 @@ static LinphoneLoggingServiceCbs *_linphone_logging_service_cbs_new(void);
// Use a thread local variable so if two different threads are printing a log at the same time, it won't be a race condition on the currentCbs
// causing it to be set to null by one thread while the second one is in the log callback and that will either cause a crash on the worst case scenario
// or cause the log to be lost on the best case scenario.
thread_local LinphoneLoggingServiceCbs* currentCbs = NULL;
static thread_local LinphoneLoggingServiceCbs* currentCbs = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment