Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tvhlog: fix the wrong mutex, fixes #3093
  • Loading branch information
perexg committed Sep 19, 2015
1 parent 7b32791 commit 9de43dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tvhlog.c
Expand Up @@ -467,14 +467,14 @@ tvhlog_class_path_set ( void *o, const void *v )
{
const char *s = v;
if (strcmp(s ?: "", tvhlog_path ?: "")) {
pthread_mutex_unlock(&tvhlog_mutex);
pthread_mutex_lock(&tvhlog_mutex);
free(tvhlog_path);
tvhlog_path = strdup(s ?: "");
if (tvhlog_path && tvhlog_path[0])
tvhlog_options |= TVHLOG_OPT_DBG_FILE;
else
tvhlog_options &= ~TVHLOG_OPT_DBG_FILE;
pthread_mutex_lock(&tvhlog_mutex);
pthread_mutex_unlock(&tvhlog_mutex);
return 1;
}
return 0;
Expand Down

0 comments on commit 9de43dc

Please sign in to comment.