]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/message.c
kes Apply Marco van Wieringen's set of patches, cleans up Migration/Copy
[bacula/bacula] / bacula / src / lib / message.c
index ecf5945c9c4d60a2feb67c8ed421c7261eea7982..85ba0b6d050ac34501e248d9754ade5d859e3dc3 100644 (file)
@@ -65,7 +65,7 @@ brwlock_t con_lock;                   /* Console lock structure */
 /* Forward referenced functions */
 
 /* Imported functions */
-
+void create_jcr_key();
 
 /* Static storage */
 
@@ -188,6 +188,10 @@ init_msg(JCR *jcr, MSGS *msg)
 
    if (jcr == NULL && msg == NULL) {
       init_last_jobs_list();
+      /* Create a daemon key then set invalid jcr */
+      /* Maybe we should give the daemon a jcr??? */
+      create_jcr_key();
+      set_jcr_in_tsd(INVALID_JCR);
    }
 
 #if !defined(HAVE_WIN32)