]> git.sur5r.net Git - bacula/bacula/commitdiff
Make watchdog connect timeout queue messages rather than sending
authorKern Sibbald <kern@sibbald.com>
Thu, 3 Jul 2008 14:46:12 +0000 (14:46 +0000)
committerKern Sibbald <kern@sibbald.com>
Thu, 3 Jul 2008 14:46:12 +0000 (14:46 +0000)
     directly to avoid lock conflicts with the real thread.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@7298 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/lib/jcr.c
bacula/technotes-2.4

index 3ce86e23f4bde13d7cff019a99ec51ba731fd413..cd406150e4db94ac4909c0bef0e31051c10849b8 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -428,7 +428,7 @@ void free_jcr(JCR *jcr)
    lock_jcr_chain();
    jcr->dec_use_count();              /* decrement use count */
    if (jcr->use_count() < 0) {
-      Emsg2(M_ERROR, 0, _("JCR use_count=%d JobId=%d\n"),
+      Jmsg2(jcr, M_ERROR, 0, _("JCR use_count=%d JobId=%d\n"),
          jcr->use_count(), jcr->JobId);
    }
    Dmsg3(3400, "Dec free_jcr 0x%x use_count=%d jobid=%d\n", jcr, jcr->use_count(), jcr->JobId);
@@ -758,7 +758,7 @@ static void jcr_timeout_check(watchdog_t *self)
          if (timer_start && (watchdog_time - timer_start) > fd->timeout) {
             fd->timer_start = 0;      /* turn off timer */
             fd->set_timed_out();
-            Jmsg(jcr, M_ERROR, 0, _(
+            Qmsg(jcr, M_ERROR, 0, _(
 "Watchdog sending kill after %d secs to thread stalled reading Storage daemon.\n"),
                  watchdog_time - timer_start);
             pthread_kill(jcr->my_thread_id, TIMEOUT_SIGNAL);
@@ -770,7 +770,7 @@ static void jcr_timeout_check(watchdog_t *self)
          if (timer_start && (watchdog_time - timer_start) > fd->timeout) {
             fd->timer_start = 0;      /* turn off timer */
             fd->set_timed_out();
-            Jmsg(jcr, M_ERROR, 0, _(
+            Qmsg(jcr, M_ERROR, 0, _(
 "Watchdog sending kill after %d secs to thread stalled reading File daemon.\n"),
                  watchdog_time - timer_start);
             pthread_kill(jcr->my_thread_id, TIMEOUT_SIGNAL);
@@ -782,7 +782,7 @@ static void jcr_timeout_check(watchdog_t *self)
          if (timer_start && (watchdog_time - timer_start) > fd->timeout) {
             fd->timer_start = 0;      /* turn off timer */
             fd->set_timed_out();
-            Jmsg(jcr, M_ERROR, 0, _(
+            Qmsg(jcr, M_ERROR, 0, _(
 "Watchdog sending kill after %d secs to thread stalled reading Director.\n"),
                  watchdog_time - timer_start);
             pthread_kill(jcr->my_thread_id, TIMEOUT_SIGNAL);
index 28f2aadb2063743a8129d9e785790c81e2932fbc..c4038e19804ce148d758eda376266ce22f16556f 100644 (file)
@@ -2,6 +2,8 @@
 
 General:
 03Jul08
+kes  Make watchdog connect timeout queue messages rather than sending
+     directly to avoid lock conflicts with the real thread.
 kes  Remove const char that causes problems with Python, which has
      older 'incorrect' headers.
 kes  Add const char in dbd.c to avoid compiler warnings.