*
* Kern Sibbald, April MMII
*
- * Version $Id$
*/
#include "bacula.h"
UAContext *ua = (UAContext *)ctx;
struct stat statp;
int32_t LinkFI;
- const char *fileid;
- char *lstat;
+ char *fileid=row[BVFS_FileId];
+ char *lstat=row[BVFS_LStat];
+ char *jobid=row[BVFS_JobId];
+
char empty[] = "A A A A A A A A A A A A A A";
+ char zero[] = "0";
- lstat = (row[BVFS_LStat] && row[BVFS_LStat][0])?row[BVFS_LStat]:empty;
- fileid = (row[BVFS_FileId] && row[BVFS_FileId][0])?row[BVFS_FileId]:"0";
+ /* We need to deal with non existant path */
+ if (!fileid || !is_a_number(fileid)) {
+ lstat = empty;
+ jobid = zero;
+ fileid = zero;
+ }
memset(&statp, 0, sizeof(struct stat));
decode_stat(lstat, &statp, &LinkFI);
- Dmsg1(0, "type=%s\n", row[0]);
+ Dmsg1(100, "type=%s\n", row[0]);
if (bvfs_is_dir(row)) {
char *path = bvfs_basename_dir(row[BVFS_Name]);
ua->send_msg("%s\t0\t%s\t%s\t%s\t%s\n", row[BVFS_PathId], fileid,
- row[BVFS_JobId], row[BVFS_LStat], path);
+ jobid, lstat, path);
} else if (bvfs_is_file(row)) {
ua->send_msg("%s\t%s\t%s\t%s\t%s\t%s\n", row[BVFS_PathId],
- row[BVFS_FilenameId], fileid, row[BVFS_JobId],
- row[BVFS_LStat], row[BVFS_Name]);
+ row[BVFS_FilenameId], fileid, jobid,
+ lstat, row[BVFS_Name]);
}
return 0;
ua->send_msg("Catalog\n");
ua->send_msg("InitCatalog\n");
ua->send_msg("VolumeToCatalog\n");
+ ua->send_msg("Base\n");
return true;
}
ua->send_msg("max_vol_bytes=%s", edit_uint64(pool->MaxVolBytes, ed1));
ua->send_msg("auto_prune=%d", pool->AutoPrune);
ua->send_msg("recycle=%d", pool->Recycle);
+ ua->send_msg("file_retention=%s", edit_uint64(pool->FileRetention, ed1));
+ ua->send_msg("job_retention=%s", edit_uint64(pool->JobRetention, ed1));
}
}
return true;