]> git.sur5r.net Git - bacula/bacula/commitdiff
Correct watchdog mutex bug
authorKern Sibbald <kern@sibbald.com>
Tue, 22 Apr 2003 07:18:29 +0000 (07:18 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 22 Apr 2003 07:18:29 +0000 (07:18 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@453 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/lib/watchdog.c
bacula/src/version.h

index 786c1366a4ec3e802d2b3f22ef84ad0c394b4530..8f75dbb8899ef4f8dee009b4bee8a6cdb479d7db 100755 (executable)
@@ -117,7 +117,6 @@ static void *btimer_thread(void *arg)
    Dmsg0(200, "Start watchdog thread\n");
    pthread_detach(pthread_self());
 
-   P(mutex);
    for ( ;!quit; ) {
       time_t timer_start, now;
 
@@ -178,6 +177,7 @@ static void *btimer_thread(void *arg)
        * Now handle child and thread timers set by the code.
        */
       /* Walk child chain killing off any process overdue */
+      P(mutex);
       for (wid = timer_chain; wid; wid=wid->next) {
         int killed = FALSE;
         /* First ask him politely to go away */
@@ -206,10 +206,9 @@ static void *btimer_thread(void *arg)
            }
         }
       }
-      
+      V(mutex);
    } /* end of big for loop */
 
-   V(mutex);
    Dmsg0(200, "End watchdog\n");
    return NULL;
 }
index b6780fc3f007aaca5bacfd50399496183393b2b3..ea659e40a7856a02b175fed54cac72e2828bcd4c 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #define VERSION "1.30"
 #define VSTRING "1"
-#define BDATE   "21 April 2003"
-#define LSMDATE "21Apr03"
+#define BDATE   "22 April 2003"
+#define LSMDATE "22Apr03"
 
 /* Debug flags */
 #define DEBUG 1