]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix #1414 When the FD is down, status dir now prints "is waiting for Client xx-fd"
authorEric Bollengier <eric@baculasystems.com>
Thu, 12 Nov 2015 08:33:39 +0000 (09:33 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 21 Nov 2015 17:59:09 +0000 (09:59 -0800)
bacula/src/dird/ua_status.c

index 6ac3d66ed28b4a96da05ed9f28343bb4c3cb3342..4256c70dfa59413c11c252de9278610aa63df1dd 100644 (file)
@@ -1002,17 +1002,21 @@ static void list_running_jobs(UAContext *ua)
          msg = _("is waiting for an appendable Volume");
          break;
       case JS_WaitFD:
-         if (!pool_mem) {
-            emsg = (char *)get_pool_memory(PM_FNAME);
-            pool_mem = true;
+         /* Special case when JobStatus=JS_WaitFD, we don't have a FD link yet 
+          * we need to stay in WaitFD status See bee mantis #1414 */
+         if (jcr->JobStatus != JS_WaitFD) {
+            if (!pool_mem) {
+               emsg = (char *)get_pool_memory(PM_FNAME);
+               pool_mem = true;
+            }
+            if (!jcr->client || !jcr->wstore) {
+               Mmsg(emsg, _("is waiting for Client to connect to Storage daemon"));
+            } else {
+               Mmsg(emsg, _("is waiting for Client %s to connect to Storage %s"),
+                    jcr->client->name(), jcr->wstore->name());
+            }
+            msg = emsg;
          }
-         if (!jcr->client || !jcr->wstore) {
-            Mmsg(emsg, _("is waiting for Client to connect to Storage daemon"));
-         } else {
-            Mmsg(emsg, _("is waiting for Client %s to connect to Storage %s"),
-                 jcr->client->name(), jcr->wstore->name());
-        }
-        msg = emsg;
         break;
       case JS_DataCommitting:
          msg = _("SD committing Data");