locking work
authorSuper User <root@isdn.jolly.ten>
Tue, 29 Apr 2008 08:00:44 +0000 (10:00 +0200)
committerSuper User <root@isdn.jolly.ten>
Tue, 29 Apr 2008 08:00:44 +0000 (10:00 +0200)
modified:   chan_lcr.c

chan_lcr.c

index 579d6e7..0a38304 100644 (file)
@@ -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;
 }