Skip to content

Commit

Permalink
Revert "make fluid_log() thread safe"
Browse files Browse the repository at this point in the history
This reverts commit d25cdae.
Mistakenly committed too early on the wrong branch.
  • Loading branch information
derselbst committed Oct 12, 2018
1 parent 2b56307 commit 7517c17
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/utils/fluid_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,20 @@ fluid_default_log_function(int level, const char *message, void *data)
int
fluid_log(int level, const char *fmt, ...)
{
fluid_log_function_t fun = NULL;

va_list args;
va_start(args, fmt);
FLUID_VSNPRINTF(fluid_errbuf, sizeof(fluid_errbuf), fmt, args);
va_end(args);

if((level >= 0) && (level < LAST_LOG_LEVEL))
{
fluid_log_function_t fun = fluid_log_function[level];
fun = fluid_log_function[level];

if(fun != NULL)
{
char errbuf[1024];

va_list args;
va_start(args, fmt);
FLUID_VSNPRINTF(errbuf, sizeof(errbuf), fmt, args);
va_end(args);

(*fun)(level, errbuf, fluid_log_user_data[level]);
(*fun)(level, fluid_errbuf, fluid_log_user_data[level]);
}
}

Expand Down

0 comments on commit 7517c17

Please sign in to comment.