]> git.sur5r.net Git - bacula/bacula/commitdiff
Add temporary fix to avoid a deadlock after a reload command on an incorrect configur...
authorEric Bollengier <eric@baculasystems.com>
Wed, 15 Nov 2017 10:16:25 +0000 (11:16 +0100)
committerKern Sibbald <kern@sibbald.com>
Mon, 20 Nov 2017 07:04:53 +0000 (08:04 +0100)
bacula/src/lib/message.c

index 44a7dc1e4022540bbb90c38b991741a2f81ec1e1..cfb838860975c341b0084ab72e7a584517b88444 100644 (file)
@@ -834,10 +834,18 @@ void dispatch_message(JCR *jcr, int type, utime_t mtime, char *msg)
     if (!jcr) {
        jcr = get_jcr_from_tsd();
     }
     if (!jcr) {
        jcr = get_jcr_from_tsd();
     }
+
+/* Temporary fix for a deadlock in the reload command when
+ * the configuration has a problem. The JCR chain is locked
+ * during the reload, we cannot create a new JCR.
+ */
+#if 0
     if (!jcr) {
        jcr = new_jcr(sizeof(JCR), NULL);
        created_jcr = true;
     }
     if (!jcr) {
        jcr = new_jcr(sizeof(JCR), NULL);
        created_jcr = true;
     }
+#endif
+
     if (jcr) {
        msgs = jcr->jcr_msgs;
     }
     if (jcr) {
        msgs = jcr->jcr_msgs;
     }