From: Super User Date: Tue, 29 Apr 2008 08:00:44 +0000 (+0200) Subject: locking work X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=commitdiff_plain;h=cd8dc297eb5d3a75f86bc71d6c110af3bbf829a9 locking work modified: chan_lcr.c --- diff --git a/chan_lcr.c b/chan_lcr.c index 579d6e7..0a38304 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -754,6 +754,8 @@ static void *chan_thread(void *arg) { int work; + pthread_mutex_lock(&chan_lock); + while(!quit) { work = 0; @@ -777,6 +779,9 @@ static void *chan_thread(void *arg) pthread_mutex_lock(&chan_lock); } } + + pthread_mutex_unlock(&chan_lock); + return NULL; }