Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/dird/ua_label.cc')
-rw-r--r--core/src/dird/ua_label.cc25
1 files changed, 13 insertions, 12 deletions
diff --git a/core/src/dird/ua_label.cc b/core/src/dird/ua_label.cc
index c0d39ed07..837aee4c2 100644
--- a/core/src/dird/ua_label.cc
+++ b/core/src/dird/ua_label.cc
@@ -37,7 +37,7 @@
#endif
#include "dird/ndmp_dma_storage.h"
-#include "dird/jcr_private.h"
+#include "dird/director_jcr_impl.h"
#include "dird/sd_cmds.h"
#include "dird/storage.h"
#include "dird/ua_db.h"
@@ -65,7 +65,7 @@ static inline bool update_database(UaContext* ua,
if (media_record_exists) {
// Update existing media record.
mr->InChanger = mr->Slot > 0; /* If slot give assume in changer */
- SetStorageidInMr(ua->jcr->impl->res.write_storage, mr);
+ SetStorageidInMr(ua->jcr->dir_impl->res.write_storage, mr);
if (!ua->db->UpdateMediaRecord(ua->jcr, mr)) {
ua->ErrorMsg("%s", ua->db->strerror());
retval = false;
@@ -75,7 +75,7 @@ static inline bool update_database(UaContext* ua,
SetPoolDbrDefaultsInMediaDbr(mr, pr);
mr->InChanger = mr->Slot > 0; /* If slot give assume in changer */
mr->Enabled = 1;
- SetStorageidInMr(ua->jcr->impl->res.write_storage, mr);
+ SetStorageidInMr(ua->jcr->dir_impl->res.write_storage, mr);
if (ua->db->CreateMediaRecord(ua->jcr, mr)) {
ua->InfoMsg(_("Catalog record for Volume \"%s\", Slot %hd successfully "
@@ -111,7 +111,7 @@ static inline bool native_send_label_request(UaContext* ua,
if (!(sd = open_sd_bsock(ua))) { return false; }
- bstrncpy(dev_name, ua->jcr->impl->res.write_storage->dev_name(),
+ bstrncpy(dev_name, ua->jcr->dir_impl->res.write_storage->dev_name(),
sizeof(dev_name));
BashSpaces(dev_name);
BashSpaces(mr->VolumeName);
@@ -271,19 +271,20 @@ static inline bool IsCleaningTape(UaContext* ua,
bool retval;
// Find Pool resource
- ua->jcr->impl->res.pool = ua->GetPoolResWithName(pr->Name, false);
- if (!ua->jcr->impl->res.pool) {
+ ua->jcr->dir_impl->res.pool = ua->GetPoolResWithName(pr->Name, false);
+ if (!ua->jcr->dir_impl->res.pool) {
ua->ErrorMsg(_("Pool \"%s\" resource not found for volume \"%s\"!\n"),
pr->Name, mr->VolumeName);
return false;
}
- retval = bstrncmp(mr->VolumeName, ua->jcr->impl->res.pool->cleaning_prefix,
- strlen(ua->jcr->impl->res.pool->cleaning_prefix));
+ retval
+ = bstrncmp(mr->VolumeName, ua->jcr->dir_impl->res.pool->cleaning_prefix,
+ strlen(ua->jcr->dir_impl->res.pool->cleaning_prefix));
Dmsg4(100, "CLNprefix=%s: Vol=%s: len=%d bstrncmp=%s\n",
- ua->jcr->impl->res.pool->cleaning_prefix, mr->VolumeName,
- strlen(ua->jcr->impl->res.pool->cleaning_prefix),
+ ua->jcr->dir_impl->res.pool->cleaning_prefix, mr->VolumeName,
+ strlen(ua->jcr->dir_impl->res.pool->cleaning_prefix),
retval ? "true" : "false");
return retval;
@@ -299,7 +300,7 @@ static void label_from_barcodes(UaContext* ua,
bool label_encrypt,
bool yes)
{
- StorageResource* store = ua->jcr->impl->res.write_storage;
+ StorageResource* store = ua->jcr->dir_impl->res.write_storage;
PoolDbRecord pr;
MediaDbRecord mr;
vol_list_t* vl;
@@ -309,7 +310,7 @@ static void label_from_barcodes(UaContext* ua,
int max_slots;
- max_slots = GetNumSlots(ua, ua->jcr->impl->res.write_storage);
+ max_slots = GetNumSlots(ua, ua->jcr->dir_impl->res.write_storage);
if (max_slots <= 0) {
ua->WarningMsg(_("No slots in changer to scan.\n"));
return;