]> git.sur5r.net Git - bacula/bacula/commitdiff
Add JobId to SD debug output
authorKern Sibbald <kern@sibbald.com>
Mon, 10 Sep 2012 15:41:25 +0000 (17:41 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 10 Sep 2012 15:41:37 +0000 (17:41 +0200)
bacula/src/stored/job.c
bacula/src/stored/stored.c

index 7fabf57785b0a0dc81ce944fccdaa984f80c5525..578f296cd366afd79d9395b22461bc08d11896c0 100644 (file)
@@ -111,6 +111,8 @@ bool job_cmd(JCR *jcr)
    }
    jcr->JobId = JobId;
    Dmsg2(800, "Start JobId=%d %p\n", JobId, jcr);
+   set_jcr_in_tsd(jcr);
+
    /*
     * If job rescheduled because previous was incomplete,
     * the Resched flag is set and VolSessionId and VolSessionTime
index b31b8392f2f4dae28869ac442450891beb77749f..a180cfa407b8a45ffa0d4d85448e6a42c6ead50f 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2011 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2012 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.
@@ -249,6 +249,7 @@ int main (int argc, char *argv[])
    read_state_file(me->working_directory, "bacula-sd", 
                    get_first_port_host_order(me->sdaddrs));
 
+   set_jcr_in_tsd(INVALID_JCR);
    /* Make sure on Solaris we can run concurrent, watch dog + servers + misc */
    set_thread_concurrency(me->max_concurrent_jobs * 2 + 4);
    lmgr_init_thread(); /* initialize the lockmanager stack */