From: Eric Bollengier Date: Tue, 26 Jan 2010 14:36:18 +0000 (+0100) Subject: Fix #1467 about ActionOnPurge with Devices having space X-Git-Tag: Release-7.0.0~2306 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b0d6dcef63eab3528415e4f031487e8caf3c122;p=bacula%2Fbacula Fix #1467 about ActionOnPurge with Devices having space --- diff --git a/bacula/src/dird/ua_purge.c b/bacula/src/dird/ua_purge.c index c75411812b..dc101f1500 100644 --- a/bacula/src/dird/ua_purge.c +++ b/bacula/src/dird/ua_purge.c @@ -577,6 +577,7 @@ static BSOCK *open_sd_bsock(UAContext *ua) */ bool mark_media_purged(UAContext *ua, MEDIA_DBR *mr) { + char dev_name[MAX_NAME_LENGTH]; JCR *jcr = ua->jcr; if (strcmp(mr->VolStatus, "Append") == 0 || strcmp(mr->VolStatus, "Full") == 0 || @@ -593,6 +594,8 @@ bool mark_media_purged(UAContext *ua, MEDIA_DBR *mr) */ BSOCK *sd; if ((sd=open_sd_bsock(ua)) != NULL) { + bstrncpy(dev_name, ua->jcr->wstore->dev_name(), sizeof(dev_name)); + bash_spaces(dev_name); bash_spaces(mr->VolumeName); sd->fsend("action_on_purge %s vol=%s action=%d", ua->jcr->wstore->dev_name(), diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 12b629560b..400647da13 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -896,6 +896,7 @@ static bool action_on_purge_cmd(JCR *jcr) goto done; } unbash_spaces(volumename.c_str()); + unbash_spaces(devname.c_str()); /* FIXME: autochanger, drive = 0? how can we avoid that? we only work on * files