*/
/*
- Copyright (C) 2001, 2002 Kern Sibbald and John Walker
+ Copyright (C) 2001-2003 Kern Sibbald and John Walker
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
#ifdef HAVE_BACULA_DB
/* Forward referenced functions */
-int db_find_job_start_time(B_DB *mdb, JOB_DBR *jr, char *stime);
/* -----------------------------------------------------------------------
*
* Returns: 0 on failure
* 1 on success, jr unchanged, but stime set
*/
-int db_find_job_start_time(B_DB *mdb, JOB_DBR *jr, char *stime)
+int db_find_job_start_time(JCR *jcr, B_DB *mdb, JOB_DBR *jr, POOLMEM **stime)
{
char cmd[MAXSTRING], Name[MAX_NAME_LENGTH], StartTime[MAXSTRING];
int Type, Level;
int found;
long addr;
- strcpy(stime, "0000-00-00 00:00:00"); /* default */
db_lock(mdb);
+ pm_strcpy(stime, "0000-00-00 00:00:00"); /* default */
if (!bdb_open_jobs_file(mdb)) {
db_unlock(mdb);
return 0;
/* Reset for next read */
fseek(mdb->jobfd, addr, SEEK_SET);
if (found) {
- strcpy(stime, StartTime);
+ pm_strcpy(stime, StartTime);
stat = 1; /* Got a candidate */
Dmsg5(200, "Got candidate JobId=%d Type=%c Level=%c Name=%s StartTime=%s\n",
JobId, Type, Level, Name, StartTime);
*
* Find a Volume for a given PoolId, MediaType, and VolStatus
*
+ * Note! this does not correctly implement InChanger.
+ *
* Returns: 0 on failure
* numrows on success
- */
-int db_find_next_volume(B_DB *mdb, int item, MEDIA_DBR *mr)
+ */
+int
+db_find_next_volume(JCR *jcr, B_DB *mdb, int item, bool InChanger, MEDIA_DBR *mr)
{
MEDIA_DBR omr;
int stat = 0;
return stat;
}
-int db_find_last_jobid(B_DB *mdb, JOB_DBR *jr) { return 0; }
+int
+db_find_last_jobid(JCR *jcr, B_DB *mdb, char *Name, JOB_DBR *jr)
+{ return 0; }
#endif /* HAVE_BACULA_DB */