]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_status.c
Ensure that StorageId is updated after write
[bacula/bacula] / bacula / src / dird / ua_status.c
index 2af39ad5afa62aaadeec19f7a3ecff2d1ce40008..c2a2053e758f7c82e69092c5bfe215dea753d321 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-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.
@@ -31,7 +31,6 @@
  *
  *     Kern Sibbald, August MMI
  *
- *   Version $Id$
  */
 
 
@@ -295,8 +294,9 @@ void list_dir_status_header(UAContext *ua)
    ua->send_msg(_("%s Version: %s (%s) %s %s %s\n"), my_name, VERSION, BDATE,
             HOST_OS, DISTNAME, DISTVER);
    bstrftime_nc(dt, sizeof(dt), daemon_start_time);
-   ua->send_msg(_("Daemon started %s. Jobs: run=%d, running=%d\n"), dt,
-                   num_jobs_run, job_count());
+   ua->send_msg(_("Daemon started %s. Jobs: run=%d, running=%d "
+                  "mode=%d,%d\n"), dt,
+                num_jobs_run, job_count(), (int)DEVELOPER_MODE, (int)BEEF);
    ua->send_msg(_(" Heap: heap=%s smbytes=%s max_bytes=%s bufs=%s max_bufs=%s\n"),
             edit_uint64_with_commas((char *)sbrk(0)-(char *)start_heap, b1),
             edit_uint64_with_commas(sm_bytes, b2),
@@ -453,7 +453,6 @@ static void prt_runtime(UAContext *ua, sched_pkt *sp)
    int orig_jobtype;
 
    orig_jobtype = jcr->getJobType();
-   memset(&mr, 0, sizeof(mr));
    if (sp->job->JobType == JT_BACKUP) {
       jcr->db = NULL;
       ok = complete_jcr_for_job(jcr, sp->job, sp->pool);
@@ -463,8 +462,8 @@ static void prt_runtime(UAContext *ua, sched_pkt *sp)
       }
       if (ok) {
          mr.PoolId = jcr->jr.PoolId;
-         mr.StorageId = sp->store->StorageId;
          jcr->wstore = sp->store;
+         set_storageid_in_mr(jcr->wstore, &mr);
          Dmsg0(250, "call find_next_volume_for_append\n");
          /* no need to set ScratchPoolId, since we use fnv_no_create_vol */
          ok = find_next_volume_for_append(jcr, &mr, 1, fnv_no_create_vol, fnv_no_prune);