From 268edade58ad594ed60bc06428a29ff3d0dfa979 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 1 Jul 2008 10:16:53 +0000 Subject: [PATCH] Backup bad fix git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7271 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/cats/cats.h | 2 +- bacula/src/cats/postgresql.c | 4 ++-- bacula/src/lib/base64.c | 2 +- bacula/src/stored/askdir.c | 4 ++-- bacula/src/stored/stored_conf.c | 2 +- bacula/src/stored/stored_conf.h | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bacula/src/cats/cats.h b/bacula/src/cats/cats.h index 38f8180cc3..343e34ab67 100644 --- a/bacula/src/cats/cats.h +++ b/bacula/src/cats/cats.h @@ -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); diff --git a/bacula/src/cats/postgresql.c b/bacula/src/cats/postgresql.c index 87bf00f9c4..a280857652 100644 --- a/bacula/src/cats/postgresql.c +++ b/bacula/src/cats/postgresql.c @@ -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); diff --git a/bacula/src/lib/base64.c b/bacula/src/lib/base64.c index a7e551a884..0f69ca7e2c 100644 --- a/bacula/src/lib/base64.c +++ b/bacula/src/lib/base64.c @@ -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]; } diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index 47250e7cbb..c6b72b1250 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -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); diff --git a/bacula/src/stored/stored_conf.c b/bacula/src/stored/stored_conf.c index fadf14feb9..9494bf7bf4 100644 --- a/bacula/src/stored/stored_conf.c +++ b/bacula/src/stored/stored_conf.c @@ -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}, diff --git a/bacula/src/stored/stored_conf.h b/bacula/src/stored/stored_conf.h index 21323de09a..1a6d1df66b 100644 --- a/bacula/src/stored/stored_conf.h +++ b/bacula/src/stored/stored_conf.h @@ -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 */ -- 2.39.5