Skip to content

Commit

Permalink
bls.cc: call bSdEventSetupRecordTranslation
Browse files Browse the repository at this point in the history
This call lets the autoxflate plugin setup the compression buffers.
  • Loading branch information
pstorz authored and arogge committed Feb 2, 2023
1 parent bd9eb37 commit 6ebb09f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions core/src/stored/bls.cc
Expand Up @@ -3,7 +3,7 @@
Copyright (C) 2000-2012 Free Software Foundation Europe e.V.
Copyright (C) 2011-2012 Planets Communications B.V.
Copyright (C) 2013-2022 Bareos GmbH & Co. KG
Copyright (C) 2013-2023 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -238,16 +238,22 @@ int main(int argc, char* argv[])
jcr = SetupJcr("bls", device.data(), bsr, director, dcr, VolumeNames,
true); /* read device */
if (!jcr) { exit(1); }


// Let SD plugins setup the record translation
if (GeneratePluginEvent(jcr, bSdEventSetupRecordTranslation, dcr)
!= bRC_OK) {
Jmsg(jcr, M_FATAL, 0, _("bSdEventSetupRecordTranslation call failed!\n"));
}

jcr->sd_impl->ignore_label_errors = ignore_label_errors;
dev = jcr->sd_impl->dcr->dev;
if (!dev) { exit(1); }
dcr = jcr->sd_impl->dcr;
rec = new_record();
attr = new_attr(jcr);
/*
* Assume that we have already read the volume label.
* If on second or subsequent volume, adjust buffer pointer
*/
/* Assume that we have already read the volume label.
* If on second or subsequent volume, adjust buffer pointer */
if (dev->VolHdr.PrevVolumeName[0] != 0) { /* second volume */
Pmsg1(0,
_("\n"
Expand Down

0 comments on commit 6ebb09f

Please sign in to comment.