From: Alain Spineux Date: Fri, 6 Jan 2023 16:11:13 +0000 (+0100) Subject: !! handle the Jmsg at an upper level when required X-Git-Tag: Beta-15.0.0~288 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f6ff5062bb67b024551e1c39886569f1356cf51;p=thirdparty%2Fbacula.git !! handle the Jmsg at an upper level when required The goal is to allow the "next_volume" to work in a backup and in last resort to finish by a mount request This Jmsg was handy, it was avoiding to handle the error a the caller level and sometime at the caller+2 level Here they are DEVICE::load_encryption_key(DCR *, const char *, const char *, u_int32_t *, unsigned char *, u_int32_t *, unsigned char *) : bool DEVICE::read_dev_volume_label(DCR *) : int acquire_device_for_read(DCR *, u_int32_t) : bool aligned_dev::read_dev_volume_label(DCR *) : int cloud_dev::read_dev_volume_label(DCR *) : int DCR::check_volume_label(bool &, bool &) : int device_initialization(void *) : void * label_volume_if_ok(DCR *, char *, char *, char *, int, int) : void mount_cmd(JCR *) : bool read_label(DCR *) : bool read_volume_label(JCR *, DCR *, DEVICE *, int) : void readlabelcmd() : void DEVICE::rewrite_volume_label(DCR *, bool) : bool cloud_dev::rewrite_volume_label(DCR *, bool) : bool DCR::mount_next_write_volume() : bool DEVICE::write_volume_label(DCR *, const char *, const char *, bool, bool) : bool cloud_dev::write_volume_label(DCR *, const char *, const char *, bool, bool) : bool DCR::try_autolabel(bool) : int label_volume_if_ok(DCR *, char *, char *, char *, int, int) : void labelcmd() : void --- diff --git a/bacula/src/stored/dev.c b/bacula/src/stored/dev.c index 54bd25a29..920137f50 100644 --- a/bacula/src/stored/dev.c +++ b/bacula/src/stored/dev.c @@ -1411,8 +1411,10 @@ bool DEVICE::load_encryption_key(DCR *dcr, const char *operation, } if (err_msg.c_str()[0] != '\0') { Dmsg2(10, "load encryption key for volume %s Err=%s\n", dcr->VolumeName, err_msg.c_str()); +#if 0 Jmsg(jcr, M_FATAL, 0, _("3992 Bad LoadEncryptionKey %s Volume \"%s\": " "ERR=%s\n"), operation, dcr->VolumeName, err_msg.c_str()); +#endif if (jcr != NULL) { Mmsg(jcr->errmsg, _("3992 Bad LoadEncryptionKey %s Volume \"%s\": " "ERR=%s\n"), operation, dcr->VolumeName, err_msg.c_str());