]> git.sur5r.net Git - bacula/bacula/commitdiff
Backup bad fix
authorKern Sibbald <kern@sibbald.com>
Tue, 1 Jul 2008 10:16:53 +0000 (10:16 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 1 Jul 2008 10:16:53 +0000 (10:16 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7271 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/cats/cats.h
bacula/src/cats/postgresql.c
bacula/src/lib/base64.c
bacula/src/stored/askdir.c
bacula/src/stored/stored_conf.c
bacula/src/stored/stored_conf.h

index 38f8180cc35bbcb9e914553e71a80027ef948093..343e34ab6716b9b52999793e008ae1e2608d9eab 100644 (file)
@@ -482,7 +482,7 @@ void               my_postgresql_free_result(B_DB *mdb);
 POSTGRESQL_ROW     my_postgresql_fetch_row  (B_DB *mdb);
 int                my_postgresql_query      (B_DB *mdb, const char *query);
 void               my_postgresql_data_seek  (B_DB *mdb, int row);
-int                my_postgresql_currval    (B_DB *mdb, char *table_name);
+int                my_postgresql_currval    (B_DB *mdb, const char *table_name);
 void               my_postgresql_field_seek (B_DB *mdb, int row);
 POSTGRESQL_FIELD * my_postgresql_fetch_field(B_DB *mdb);
 
index 87bf00f9c4d2b444293706d765550014c98f9d70..a280857652b056deab1deb4eff2eec02cb6dfa6b 100644 (file)
@@ -546,7 +546,7 @@ void my_postgresql_free_result(B_DB *mdb)
    db_unlock(mdb);
 }
 
-int my_postgresql_currval(B_DB *mdb, char *table_name)
+int my_postgresql_currval(B_DB *mdb, const char *table_name)
 {
    // Obtain the current value of the sequence that
    // provides the serial value for primary key of the table.
@@ -710,7 +710,7 @@ int my_postgresql_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar)
    int res;
    int count=30;
    size_t len;
-   char *digest;
+   const char *digest;
    char ed1[50];
 
    mdb->esc_name = check_pool_memory_size(mdb->esc_name, mdb->fnl*2+1);
index a7e551a88469c548017a6c222af1c56090d8ef75..0f69ca7e2c3019fbd1bdbaf240cb409533ef6b79 100644 (file)
@@ -177,7 +177,7 @@ bin_to_base64(char *buf, int buflen, char *bin, int binlen, int compatible)
    if (rem && j < buflen) {
       mask = (1 << rem) - 1;
       if (compatible) {
-         buf[j++] = base64_digits[((reg & mask) << 6) - rem];
+         buf[j++] = base64_digits[(reg & mask) << 6 - rem];
       } else {
          buf[j++] = base64_digits[reg & mask];
       }
index 47250e7cbbd7a1c14644456602c3b5c71d5f1329..c6b72b12506257e8ac5be74f00fee20ec4edcf34 100644 (file)
@@ -506,9 +506,9 @@ bool dir_ask_sysop_to_create_appendable_volume(DCR *dcr)
                dev->print_name(),
                dcr->pool_name,
                dcr->media_type);
+            Jmsg(jcr, M_MOUNT, 0, "%s", dev->errmsg);
+            Dmsg1(100, "%s", dev->errmsg);
          }
-         Jmsg(jcr, M_MOUNT, 0, "%s", dev->errmsg);
-         Dmsg1(100, "%s", dev->errmsg);
       }
 
       set_jcr_job_status(jcr, JS_WaitMedia);
index fadf14feb9e86e9c0f5d106eda3d9eeee8755b03..9494bf7bf4cc1e6f5d06db1ec589dba1c9ebeb3f 100644 (file)
@@ -140,7 +140,7 @@ static RES_ITEM dev_items[] = {
    {"checklabels",           store_bit,  ITEM(res_dev.cap_bits), CAP_CHECKLABELS, ITEM_DEFAULT, 0},
    {"requiresmount",         store_bit,  ITEM(res_dev.cap_bits), CAP_REQMOUNT, ITEM_DEFAULT, 0},
    {"offlineonunmount",      store_bit,  ITEM(res_dev.cap_bits), CAP_OFFLINEUNMOUNT, ITEM_DEFAULT, 0},
-   {"autoselect",            store_bit,  ITEM(res_dev.autoselect), 1, ITEM_DEFAULT, 1},
+   {"autoselect",            store_bool, ITEM(res_dev.autoselect), 1, ITEM_DEFAULT, 1},
    {"changerdevice",         store_strname,ITEM(res_dev.changer_name), 0, 0, 0},
    {"changercommand",        store_strname,ITEM(res_dev.changer_command), 0, 0, 0},
    {"alertcommand",          store_strname,ITEM(res_dev.alert_command), 0, 0, 0},
index 21323de09a7ac725dcd45a041b6c5e324ee76ed0..1a6d1df66b78e13a480cb980112b312c10bd797b 100644 (file)
@@ -126,7 +126,7 @@ public:
    char *spool_directory;             /* Spool file directory */
    uint32_t dev_type;                 /* device type */
    uint32_t label_type;               /* label type */
-   uint32_t autoselect;               /* Automatically select from AutoChanger */
+   bool autoselect;                   /* Automatically select from AutoChanger */
    uint32_t drive_index;              /* Autochanger drive index */
    uint32_t cap_bits;                 /* Capabilities of this device */
    utime_t max_changer_wait;          /* Changer timeout */