static char Update_media[] = "CatReq Job=%127s UpdateMedia VolName=%s"
" VolJobs=%u VolFiles=%u VolBlocks=%u VolBytes=%lld VolMounts=%u"
" VolErrors=%u VolWrites=%u MaxVolBytes=%lld EndTime=%lld VolStatus=%10s"
- " Slot=%d relabel=%d InChanger=%d VolReadTime=%lld VolWriteTime=%lld"
+ " Slot=%d relabel=%d InChanger=%d VolReadTime=%s VolWriteTime=%s"
" VolFirstWritten=%lld VolParts=%u\n";
static char Create_job_media[] = "CatReq Job=%127s CreateJobMedia "
void catalog_request(JCR *jcr, BSOCK *bs)
{
+ char ed_vrt[50], ed_vwt[50];
MEDIA_DBR mr, sdmr;
JOBMEDIA_DBR jm;
char Job[MAX_NAME_LENGTH];
&sdmr.VolJobs, &sdmr.VolFiles, &sdmr.VolBlocks, &sdmr.VolBytes,
&sdmr.VolMounts, &sdmr.VolErrors, &sdmr.VolWrites, &sdmr.MaxVolBytes,
&VolLastWritten, &sdmr.VolStatus, &sdmr.Slot, &label, &sdmr.InChanger,
- &sdmr.VolReadTime, &sdmr.VolWriteTime, &VolFirstWritten,
+ ed_vrt, ed_vwt, &VolFirstWritten,
&sdmr.VolParts) == 19) {
+ sdmr.VolReadTime = str_to_int64(ed_vrt);
+ sdmr.VolWriteTime = str_to_int64(ed_vwt);
+
db_lock(jcr->db);
Dmsg3(400, "Update media %s oldStat=%s newStat=%s\n", sdmr.VolumeName,
mr.VolStatus, sdmr.VolStatus);
" VolBlocks=%lu VolBytes=%lld VolMounts=%lu VolErrors=%lu VolWrites=%lu"
" MaxVolBytes=%lld VolCapacityBytes=%lld VolStatus=%20s"
" Slot=%ld MaxVolJobs=%lu MaxVolFiles=%lu InChanger=%ld"
- " VolReadTime=%lld VolWriteTime=%lld EndFile=%lu EndBlock=%lu"
+ " VolReadTime=%s VolWriteTime=%s EndFile=%lu EndBlock=%lu"
" VolParts=%lu LabelType=%ld MediaId=%lld\n";
*/
static bool do_get_volume_info(DCR *dcr)
{
+ char ed_vrt[50], ed_vwt[50];
JCR *jcr = dcr->jcr;
BSOCK *dir = jcr->dir_bsock;
VOLUME_CAT_INFO vol;
&vol.VolCatWrites, &vol.VolCatMaxBytes,
&vol.VolCatCapacityBytes, vol.VolCatStatus,
&vol.Slot, &vol.VolCatMaxJobs, &vol.VolCatMaxFiles,
- &InChanger, &vol.VolReadTime, &vol.VolWriteTime,
+ &InChanger, ed_vrt, ed_vwt,
&vol.EndFile, &vol.EndBlock, &vol.VolCatParts,
&vol.LabelType, &vol.VolMediaId);
if (n != 22) {
Mmsg(jcr->errmsg, _("Error getting Volume info: %s"), dir->msg);
return false;
}
+ vol.VolReadTime = str_to_int64(ed_vrt);
+ vol.VolWriteTime = str_to_int64(ed_vwt);
vol.InChanger = InChanger; /* bool in structure */
unbash_spaces(vol.VolCatName);
bstrncpy(dcr->VolumeName, vol.VolCatName, sizeof(dcr->VolumeName));
General:
+08Apr08
+ebl Fix a catalog query error while trying to update Volume information.
06Apr08
kes Correctly detect Ubuntu systems, and add ubuntu platform directory.
kes Fix bug #1063, reuse of freed ptr in list nextvol.