/*
Bacula® - The Network Backup Solution
- Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
+ Copyright (C) 2000-2010 Free Software Foundation Europe e.V.
The main author of Bacula is Kern Sibbald, with contributions from
many others, a complete list can be found in the file AUTHORS.
*
* Kern Sibbald, December 2000
*
- * Version $Id$
*/
#include "bacula.h" /* pull in global headers */
int n;
int32_t InChanger;
+ dcr->setVolCatInfo(false);
if (dir->recv() <= 0) {
Dmsg0(200, "getvolname error bnet_recv\n");
Mmsg(jcr->errmsg, _("Network error on bnet_recv in req_vol_info.\n"));
return false;
}
vol.InChanger = InChanger; /* bool in structure */
+ vol.is_valid = true;
unbash_spaces(vol.VolCatName);
bstrncpy(dcr->VolumeName, vol.VolCatName, sizeof(dcr->VolumeName));
dcr->VolCatInfo = vol; /* structure assignment */
BSOCK *dir = jcr->dir_bsock;
P(vol_info_mutex);
- bstrncpy(dcr->VolCatInfo.VolCatName, dcr->VolumeName, sizeof(dcr->VolCatInfo.VolCatName));
- bash_spaces(dcr->VolCatInfo.VolCatName);
- dir->fsend(Get_Vol_Info, jcr->Job, dcr->VolCatInfo.VolCatName,
+ dcr->setVolCatName(dcr->VolumeName);
+ bash_spaces(dcr->getVolCatName());
+ dir->fsend(Get_Vol_Info, jcr->Job, dcr->getVolCatName(),
writing==GET_VOL_INFO_FOR_WRITE?1:0);
Dmsg1(100, ">dird %s", dir->msg);
- unbash_spaces(dcr->VolCatInfo.VolCatName);
+ unbash_spaces(dcr->getVolCatName());
bool ok = do_get_volume_info(dcr);
V(vol_info_mutex);
return ok;
/* Lock during Volume update */
P(vol_info_mutex);
- Dmsg1(100, "Update cat VolFiles=%d\n", dev->file);
+ Dmsg1(100, "Update cat VolBytes=%lld\n", vol->VolCatBytes);
/* Just labeled or relabeled the tape */
if (label) {
bstrncpy(vol->VolCatStatus, "Append", sizeof(vol->VolCatStatus));