From: Kern Sibbald Date: Mon, 10 Sep 2012 15:41:25 +0000 (+0200) Subject: Add JobId to SD debug output X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=82da6dbab87c27356f1aa1d9f9ac384fd5ba6fef;p=bacula%2Fbacula Add JobId to SD debug output --- diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 7fabf57785..578f296cd3 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -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 diff --git a/bacula/src/stored/stored.c b/bacula/src/stored/stored.c index b31b8392f2..a180cfa407 100644 --- a/bacula/src/stored/stored.c +++ b/bacula/src/stored/stored.c @@ -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 */