[prev in list] [next in list] [prev in thread] [next in thread]
List: bacula-commits
Subject: [Bacula-commits] [bacula.org] Bacula Community source git repository branch Branch-9.0 updated.
From: git () bacula ! org (Kern Sibbald)
Date: 2017-07-22 9:40:18
Message-ID: 20170722094018.920CE6A0019 () bacula ! bacula ! org
[Download RAW message or body]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Bacula Community source git repository".
The branch, Branch-9.0 has been updated
via fb0f4391198c29d92c959115ba883dcfc097a6de (commit)
from 7bcf6370bfc96f9b7a75d3668aa8c13c3848d36c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fb0f4391198c29d92c959115ba883dcfc097a6de
Author: Kern Sibbald <kern@sibbald.com>
Date: Sat Jul 22 11:39:19 2017 +0200
Tweak cleaning tape code
-----------------------------------------------------------------------
Summary of changes:
diff --git a/bacula/src/dird/ua_label.c b/bacula/src/dird/ua_label.c
index 45c6c96..c2611d0 100644
--- a/bacula/src/dird/ua_label.c
+++ b/bacula/src/dird/ua_label.c
@@ -611,9 +611,11 @@ static void label_from_barcodes(UAContext *ua, int drive)
}
continue; /* done, go handle next volume */
}
- bstrncpy(mr.MediaType, store->media_type, sizeof(mr.MediaType));
+ /* Not a cleaning tape */
+ bstrncpy(mr.MediaType, store->media_type, sizeof(mr.MediaType));
mr.Slot = vl->Slot;
+
send_label_request(ua, &mr, &omr, &pr, 0, media_record_exists, drive);
}
@@ -984,6 +986,9 @@ int get_num_drives_from_SD(UAContext *ua)
*/
static bool is_cleaning_tape(UAContext *ua, MEDIA_DBR *mr, POOL_DBR *pr)
{
+ if (ua->jcr->pool->cleaning_prefix == NULL) {
+ return false; /* if no cleaning prefix, this is not a cleaning tape */
+ }
/* Find Pool resource */
ua->jcr->pool = (POOL *)GetResWithName(R_POOL, pr->Name);
if (!ua->jcr->pool) {
@@ -991,9 +996,6 @@ static bool is_cleaning_tape(UAContext *ua, MEDIA_DBR *mr, POOL_DBR *pr)
pr->Name, mr->VolumeName);
return false;
}
- if (ua->jcr->pool->cleaning_prefix == NULL) {
- return false;
- }
Dmsg4(100, "CLNprefix=%s: Vol=%s: len=%d strncmp=%d\n",
ua->jcr->pool->cleaning_prefix, mr->VolumeName,
strlen(ua->jcr->pool->cleaning_prefix),
@@ -1003,7 +1005,10 @@ static bool is_cleaning_tape(UAContext *ua, MEDIA_DBR *mr, POOL_DBR *pr)
strlen(ua->jcr->pool->cleaning_prefix)) == 0;
}
-static void content_send_info(UAContext *ua, char type, int Slot, char *vol_name)
+/*
+ * Send Volume info to caller in API format
+ */
+static void send_volume_info(UAContext *ua, char type, int Slot, char *vol_name)
{
char ed1[50], ed2[50], ed3[50];
POOL_DBR pr;
@@ -1127,7 +1132,7 @@ void status_content(UAContext *ua, STORE *store)
ua->send_msg("D|%d||\n", Drive);
} else if (sscanf(sd->msg, "%c:%d:F:%127s", &type, &Slot, vol_name)== 3) {
- content_send_info(ua, type, Slot, vol_name);
+ send_volume_info(ua, type, Slot, vol_name);
} else if (sscanf(sd->msg, "%c:%d:E", &type, &Slot) == 2) {
/* type can be S (slot) or I (Import/Export slot) */
@@ -1148,7 +1153,7 @@ void status_content(UAContext *ua, STORE *store)
}
prev = vl;
}
- content_send_info(ua, type, Slot, vol_name);
+ send_volume_info(ua, type, Slot, vol_name);
} else {
Dmsg1(10, "Discarding msg=%s\n", sd->msg);
hooks/post-receive
--
Bacula Community source git repository
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bacula-commits mailing list
Bacula-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic