]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/catreq.c
kes Extend new GUI api code to tree commands.
[bacula/bacula] / bacula / src / dird / catreq.c
index 1d19a5a26fd053aa1ed47e93845862a2ea6357a9..e884062e6fd52c723fec754d2243f9d6933961c3 100644 (file)
@@ -90,8 +90,8 @@ static int send_volume_info_to_storage_daemon(JCR *jcr, BSOCK *sd, MEDIA_DBR *mr
       edit_uint64(mr->VolCapacityBytes, ed3),
       mr->VolStatus, mr->Slot, mr->MaxVolJobs, mr->MaxVolFiles,
       mr->InChanger,
-      edit_uint64(mr->VolReadTime, ed4),
-      edit_uint64(mr->VolWriteTime, ed5),
+      edit_int64(mr->VolReadTime, ed4),
+      edit_int64(mr->VolWriteTime, ed5),
       mr->EndFile, mr->EndBlock,
       mr->VolParts,
       mr->LabelType,
@@ -189,6 +189,9 @@ void catalog_request(JCR *jcr, BSOCK *bs)
                check_if_volume_valid_or_recyclable(jcr, &mr, &reason);
             }
          }
+         if (!reason && mr.Enabled != 1) {
+            reason = _("is not Enabled");
+         }
          if (reason == NULL) {
             /*
              * Send Find Media response to Storage daemon
@@ -277,7 +280,7 @@ void catalog_request(JCR *jcr, BSOCK *bs)
       mr.VolWriteTime = sdmr.VolWriteTime;
       mr.VolParts     = sdmr.VolParts;
       bstrncpy(mr.VolStatus, sdmr.VolStatus, sizeof(mr.VolStatus));
-      if (jcr->wstore->StorageId) {
+      if (jcr->wstore && jcr->wstore->StorageId) {
          mr.StorageId = jcr->wstore->StorageId;
       }