]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/cats/sql_create.c
ebl Modify disk-changer to check if slot contains something before
[bacula/bacula] / bacula / src / cats / sql_create.c
index 38268bdc98a922e3b5f78a203649f0f6172636c7..539ffea8840d827cded137dd46b2b6a66cb41b92 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -112,7 +112,7 @@ db_create_job_record(JCR *jcr, B_DB *mdb, JOB_DBR *jr)
 bool
 db_create_jobmedia_record(JCR *jcr, B_DB *mdb, JOBMEDIA_DBR *jm)
 {
-   bool ok = true;;
+   bool ok = true;
    int count;
    char ed1[50], ed2[50];
 
@@ -162,8 +162,6 @@ db_create_jobmedia_record(JCR *jcr, B_DB *mdb, JOBMEDIA_DBR *jm)
    return ok;
 }
 
-
-
 /* Create Unique Pool record
  * Returns: false on failure
  *          true  on success
@@ -743,7 +741,11 @@ bool my_batch_end(JCR *jcr, B_DB *mdb, const char *error)
    Dmsg0(50, "sql_batch_end started\n");
 
    if (mdb) {
+#ifdef HAVE_DBI 
+      mdb->status = (dbi_error_flag)0;
+#else
       mdb->status = 0;
+#endif
    }
    return true;
 }
@@ -967,8 +969,8 @@ bail_out:
 static int db_create_file_record(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
 {
    int stat;
-   static char *no_digest = "0";
-   char *digest;
+   static const char *no_digest = "0";
+   const char *digest;
 
    ASSERT(ar->JobId);
    ASSERT(ar->PathId);