]> git.ipfire.org Git - thirdparty/opentracker.git/commitdiff
Tested for a too strict condition, we do need the correct tasktype AND an empty taski...
authorerdgeist <>
Tue, 20 Nov 2007 02:55:13 +0000 (02:55 +0000)
committererdgeist <>
Tue, 20 Nov 2007 02:55:13 +0000 (02:55 +0000)
ot_mutex.c

index b01bb4a63e6cb7bc834fef46b017aa036e1d5f46..5624c03858dc40f47887ebbc22fa50e64dedb22c 100644 (file)
@@ -194,7 +194,7 @@ ot_taskid mutex_workqueue_poptask( ot_tasktype *tasktype ) {
   while( !taskid ) {
     /* Skip to the first unassigned task this worker wants to do */
     task = tasklist;
-    while( task && ( ( TASK_MASK & task->tasktype ) != *tasktype ) && ( task->taskid ) )
+    while( task && ( ( ( TASK_MASK & task->tasktype ) != *tasktype ) || task->taskid ) )
       task = task->next;
 
     /* If we found an outstanding task, assign a taskid to it