From: Kern Sibbald Date: Sun, 15 Sep 2002 12:19:28 +0000 (+0000) Subject: Fix error message printing (too much) X-Git-Tag: Release-1.26~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cbd4e8fdb4ef4e4d7304b7854f26b00c33523a32;p=bacula%2Fbacula Fix error message printing (too much) git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@152 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index 3d0b980857..42a787c08e 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -1260,6 +1260,11 @@ chmod 755 src/cats/sqlite chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables chmod 755 src/cats/create_bdb_database +if test x$ac_cv_sys_largefile_CFLAGS != xno ; then + ac_cv_sys_largefile_CFLAGS="yes" +fi + + echo " Configuration on `date`: diff --git a/bacula/configure b/bacula/configure index 8dfefa01ad..27bbd99c19 100755 --- a/bacula/configure +++ b/bacula/configure @@ -9932,6 +9932,11 @@ chmod 755 src/cats/sqlite chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables chmod 755 src/cats/create_bdb_database +if test x$ac_cv_sys_largefile_CFLAGS != xno ; then + ac_cv_sys_largefile_CFLAGS="yes" +fi + + echo " Configuration on `date`: diff --git a/bacula/src/cats/sql_get.c b/bacula/src/cats/sql_get.c index 0c1ad39002..af4690131f 100644 --- a/bacula/src/cats/sql_get.c +++ b/bacula/src/cats/sql_get.c @@ -153,7 +153,7 @@ int db_get_file_attributes_record(B_DB *mdb, char *fname, FILE_DBR *fdbr) * DO NOT use Jmsg in this routine. * * Note in this routine, we do not use Jmsg because it may be - * called to get attributes of a non-existant file, which is + * called to get attributes of a non-existent file, which is * "normal" if a new file is found during Verify. */ static @@ -313,12 +313,12 @@ int db_get_job_record(B_DB *mdb, JOB_DBR *jr) db_lock(mdb); if (jr->JobId == 0) { - Mmsg(&mdb->cmd, "SELECT VolSessionId, VolSessionTime, \ -PoolId, StartTime, EndTime, JobFiles, JobBytes, JobTDate, Job, JobStatus \ + Mmsg(&mdb->cmd, "SELECT VolSessionId,VolSessionTime,\ +PoolId,StartTime,EndTime,JobFiles,JobBytes,JobTDate,Job,JobStatus \ FROM Job WHERE Job='%s'", jr->Job); } else { - Mmsg(&mdb->cmd, "SELECT VolSessionId, VolSessionTime, \ -PoolId, StartTime, EndTime, JobFiles, JobBytes, JobTDate, Job, JobStatus \ + Mmsg(&mdb->cmd, "SELECT VolSessionId,VolSessionTime,\ +PoolId,StartTime,EndTime,JobFiles,JobBytes,JobTDate,Job,JobStatus \ FROM Job WHERE JobId=%u", jr->JobId); } @@ -328,7 +328,6 @@ FROM Job WHERE JobId=%u", jr->JobId); } if ((row = sql_fetch_row(mdb)) == NULL) { Mmsg1(&mdb->errmsg, _("No Job found for JobId %u\n"), jr->JobId); - Jmsg(mdb->jcr, M_ERROR, 0, "%s", mdb->errmsg); sql_free_result(mdb); db_unlock(mdb); return 0; /* failed */ @@ -356,6 +355,8 @@ FROM Job WHERE JobId=%u", jr->JobId); * number of volumes on success * Volumes are concatenated in VolumeNames * separated by a vertical bar (|). + * + * Returns: number of volumes on success */ int db_get_job_volume_names(B_DB *mdb, uint32_t JobId, POOLMEM **VolumeNames) { @@ -374,8 +375,7 @@ AND JobMedia.MediaId=Media.MediaId", JobId); mdb->num_rows = sql_num_rows(mdb); Dmsg1(130, "Num rows=%d\n", mdb->num_rows); if (mdb->num_rows <= 0) { - Mmsg1(&mdb->errmsg, _("No volumes found for JobId=%d"), JobId); - Jmsg(mdb->jcr, M_ERROR, 0, "%s", mdb->errmsg); + Mmsg1(&mdb->errmsg, _("No volumes found for JobId=%d\n"), JobId); stat = 0; } else { stat = mdb->num_rows; diff --git a/bacula/src/dird/backup.c b/bacula/src/dird/backup.c index 48aa2f9a60..1c8725f4fb 100644 --- a/bacula/src/dird/backup.c +++ b/bacula/src/dird/backup.c @@ -350,6 +350,7 @@ static void backup_cleanup(JCR *jcr, int TermCode, char *since) } kbps = (double)jcr->jr.JobBytes / (1000 * RunTime); if (!db_get_job_volume_names(jcr->db, jcr->jr.JobId, &jcr->VolumeName)) { + Jmsg(jcr, M_ERROR, 0, "%s", db_strerror(jcr->db)); jcr->VolumeName[0] = 0; /* none */ }