]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix error message printing (too much)
authorKern Sibbald <kern@sibbald.com>
Sun, 15 Sep 2002 12:19:28 +0000 (12:19 +0000)
committerKern Sibbald <kern@sibbald.com>
Sun, 15 Sep 2002 12:19:28 +0000 (12:19 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@152 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/configure.in
bacula/configure
bacula/src/cats/sql_get.c
bacula/src/dird/backup.c

index 3d0b9808578146ca8c9ad99193925609e1427656..42a787c08e424adeea498edc5ce807ab66894f32 100644 (file)
@@ -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`:
 
index 8dfefa01adfd89b3bda734e04e7ad59731c92e57..27bbd99c19733d0b1fe4326931e222d84ab5ce85 100755 (executable)
@@ -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`:
 
index 0c1ad39002442614e3f437bc6bfecddd3b7ac1fc..af4690131ff868e9c4ff1181ad5928bf1f204e1b 100644 (file)
@@ -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;
index 48aa2f9a60a6c8a6392d7131094947b53c4a65a3..1c8725f4fba862ebe27e8c5d0eb5301e65f56dce 100644 (file)
@@ -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 */
    }