diff --git a/src/cats/bdb_dbi.h b/src/cats/bdb_dbi.h index 072c99eaf54..dc7886e84e4 100644 --- a/src/cats/bdb_dbi.h +++ b/src/cats/bdb_dbi.h @@ -44,9 +44,9 @@ class B_DB_DBI: public B_DB_PRIV { const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal); + bool exit_on_fatal, + bool need_private); ~B_DB_DBI(); /* low level operations */ diff --git a/src/cats/bdb_ingres.h b/src/cats/bdb_ingres.h index e3ed40cf4d7..0adcf5638a1 100644 --- a/src/cats/bdb_ingres.h +++ b/src/cats/bdb_ingres.h @@ -40,9 +40,9 @@ class B_DB_INGRES: public B_DB_PRIV { const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal); + bool exit_on_fatal, + bool need_private); ~B_DB_INGRES(); /* low level operations */ diff --git a/src/cats/bdb_mysql.h b/src/cats/bdb_mysql.h index 61803722ea3..22e48087194 100644 --- a/src/cats/bdb_mysql.h +++ b/src/cats/bdb_mysql.h @@ -45,9 +45,9 @@ class B_DB_MYSQL: public B_DB_PRIV { const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal); + bool exit_on_fatal, + bool need_private); ~B_DB_MYSQL(); /* low level operations */ diff --git a/src/cats/bdb_postgresql.h b/src/cats/bdb_postgresql.h index e55c189d150..f1b8fcc4462 100644 --- a/src/cats/bdb_postgresql.h +++ b/src/cats/bdb_postgresql.h @@ -38,9 +38,9 @@ class B_DB_POSTGRESQL: public B_DB_PRIV { const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal); + bool exit_on_fatal, + bool need_private); ~B_DB_POSTGRESQL(); /* low level operations */ diff --git a/src/cats/bdb_sqlite.h b/src/cats/bdb_sqlite.h index 7d815d8ba0e..f992f8c01b8 100644 --- a/src/cats/bdb_sqlite.h +++ b/src/cats/bdb_sqlite.h @@ -40,9 +40,9 @@ class B_DB_SQLITE: public B_DB_PRIV { const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal); + bool exit_on_fatal, + bool need_private); ~B_DB_SQLITE(); /* Used internaly by sqlite.c to access fields in db_sql_query() */ diff --git a/src/cats/cats_backends.c b/src/cats/cats_backends.c index a701477ec21..34c7ee95bf8 100644 --- a/src/cats/cats_backends.c +++ b/src/cats/cats_backends.c @@ -90,9 +90,9 @@ B_DB *db_init_database(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) { struct stat st; char *backend_dir; @@ -144,9 +144,9 @@ B_DB *db_init_database(JCR *jcr, db_socket, mult_db_connections, disable_batch_insert, - need_private, try_reconnect, - exit_on_fatal); + exit_on_fatal, + need_private); } } } @@ -245,9 +245,9 @@ B_DB *db_init_database(JCR *jcr, db_socket, mult_db_connections, disable_batch_insert, - need_private, try_reconnect, - exit_on_fatal); + exit_on_fatal, + need_private); } else { Jmsg(jcr, M_ABORT, 0, _("Unable to load any shared library for libbareoscats-%s%s\n"), backend_interface_mapping->interface_name, DYN_LIB_EXTENSION); @@ -291,9 +291,9 @@ B_DB *db_init_database(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) { Jmsg(jcr, M_FATAL, 0, _("Please replace this dummy libbareoscats library with a proper one.\n")); Dmsg0(0, _("Please replace this dummy libbareoscats library with a proper one.\n")); diff --git a/src/cats/cats_backends.h b/src/cats/cats_backends.h index 93a967c08cd..24908a6c700 100644 --- a/src/cats/cats_backends.h +++ b/src/cats/cats_backends.h @@ -39,9 +39,9 @@ typedef B_DB *(*t_backend_instantiate)(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal); + bool exit_on_fatal, + bool need_private); typedef void (*t_flush_backend)(void); } diff --git a/src/cats/dbi.c b/src/cats/dbi.c index 062344dd087..5f04578534a 100644 --- a/src/cats/dbi.c +++ b/src/cats/dbi.c @@ -1465,9 +1465,9 @@ extern "C" B_DB CATS_IMP_EXP *backend_instantiate(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #else B_DB *db_init_database(JCR *jcr, const char *db_driver, @@ -1481,7 +1481,8 @@ B_DB *db_init_database(JCR *jcr, bool disable_batch_insert, bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #endif { B_DB_DBI *mdb = NULL; @@ -1528,9 +1529,9 @@ B_DB *db_init_database(JCR *jcr, db_socket, mult_db_connections, disable_batch_insert, - need_private, try_reconnect, - exit_on_fatal)); + exit_on_fatal, + need_private)); bail_out: V(mutex); diff --git a/src/cats/ingres.c b/src/cats/ingres.c index 4b8f4096aa2..a76e4f05233 100755 --- a/src/cats/ingres.c +++ b/src/cats/ingres.c @@ -140,9 +140,9 @@ B_DB_INGRES::B_DB_INGRES(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) { B_DB_INGRES *mdb; int next_session_id = 0; @@ -1014,9 +1014,9 @@ extern "C" B_DB CATS_IMP_EXP *backend_instantiate(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #else B_DB *db_init_database(JCR *jcr, const char *db_driver, @@ -1028,9 +1028,9 @@ B_DB *db_init_database(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #endif { B_DB_INGRES *mdb = NULL; @@ -1070,9 +1070,9 @@ B_DB *db_init_database(JCR *jcr, db_socket, mult_db_connections, disable_batch_insert, - need_private, try_reconnect, - exit_on_fatal)); + exit_on_fatal, + need_private)); bail_out: V(mutex); diff --git a/src/cats/mysql.c b/src/cats/mysql.c index d509dcd19f6..34b00552bf6 100644 --- a/src/cats/mysql.c +++ b/src/cats/mysql.c @@ -64,9 +64,9 @@ B_DB_MYSQL::B_DB_MYSQL(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) { /* * Initialize the parent class members. @@ -805,9 +805,9 @@ extern "C" B_DB CATS_IMP_EXP *backend_instantiate(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #else B_DB *db_init_database(JCR *jcr, const char *db_driver, @@ -819,9 +819,9 @@ B_DB *db_init_database(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #endif { B_DB_MYSQL *mdb = NULL; @@ -859,9 +859,9 @@ B_DB *db_init_database(JCR *jcr, db_socket, mult_db_connections, disable_batch_insert, - need_private, try_reconnect, - exit_on_fatal)); + exit_on_fatal, + need_private)); bail_out: V(mutex); diff --git a/src/cats/postgresql.c b/src/cats/postgresql.c index 70d07bcf1cd..36866442f8b 100644 --- a/src/cats/postgresql.c +++ b/src/cats/postgresql.c @@ -65,9 +65,9 @@ B_DB_POSTGRESQL::B_DB_POSTGRESQL(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) { /* * Initialize the parent class members. @@ -1183,9 +1183,9 @@ extern "C" B_DB CATS_IMP_EXP *backend_instantiate(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #else B_DB *db_init_database(JCR *jcr, const char *db_driver, @@ -1197,9 +1197,9 @@ B_DB *db_init_database(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #endif { B_DB_POSTGRESQL *mdb = NULL; @@ -1237,9 +1237,9 @@ B_DB *db_init_database(JCR *jcr, db_socket, mult_db_connections, disable_batch_insert, - need_private, try_reconnect, - exit_on_fatal)); + exit_on_fatal, + need_private)); bail_out: V(mutex); diff --git a/src/cats/sql_glue.h b/src/cats/sql_glue.h index 24526cb8dac..bf5ddc9540e 100644 --- a/src/cats/sql_glue.h +++ b/src/cats/sql_glue.h @@ -34,11 +34,11 @@ B_DB *db_init_database(JCR *jcr, const char *db_address, int db_port, const char *db_socket, - bool mult_db_connections = false, - bool disable_batch_insert = false, - bool is_private = false, - bool try_reconnect = false, - bool exit_on_fatal = false); + bool mult_db_connections, + bool disable_batch_insert, + bool try_reconnect, + bool exit_on_fatal, + bool need_private = false); /* * Glue functions from sql_glue.c diff --git a/src/cats/sqlite.c b/src/cats/sqlite.c index a7d7aedc3d1..64028773b1f 100644 --- a/src/cats/sqlite.c +++ b/src/cats/sqlite.c @@ -71,9 +71,9 @@ B_DB_SQLITE::B_DB_SQLITE(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) { /* * Initialize the parent class members. @@ -667,9 +667,9 @@ extern "C" B_DB CATS_IMP_EXP *backend_instantiate(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #else B_DB *db_init_database(JCR *jcr, const char *db_driver, @@ -681,9 +681,9 @@ B_DB *db_init_database(JCR *jcr, const char *db_socket, bool mult_db_connections, bool disable_batch_insert, - bool need_private, bool try_reconnect, - bool exit_on_fatal) + bool exit_on_fatal, + bool need_private) #endif { B_DB *mdb = NULL; @@ -717,9 +717,9 @@ B_DB *db_init_database(JCR *jcr, db_socket, mult_db_connections, disable_batch_insert, - need_private, try_reconnect, - exit_on_fatal)); + exit_on_fatal, + need_private)); bail_out: V(mutex); diff --git a/src/dird/dbcheck.c b/src/dird/dbcheck.c index 156e947a016..7b77c8e7069 100644 --- a/src/dird/dbcheck.c +++ b/src/dird/dbcheck.c @@ -314,7 +314,11 @@ int main (int argc, char *argv[]) password, dbhost, dbport, - NULL); + NULL, + false, + false, + false, + false); if (!db_open_database(NULL, db)) { Emsg1(M_FATAL, 0, "%s", db_strerror(db)); return 1; diff --git a/src/stored/bscan.c b/src/stored/bscan.c index c57a3a0a8a6..8d5594bb60f 100644 --- a/src/stored/bscan.c +++ b/src/stored/bscan.c @@ -326,7 +326,19 @@ int main (int argc, char *argv[]) db_set_backend_dirs(backend_directories); #endif - if ((db = db_init_database(NULL, db_driver, db_name, db_user, db_password, db_host, db_port, NULL)) == NULL) { + db = db_init_database(NULL, + db_driver, + db_name, + db_user, + db_password, + db_host, + db_port, + NULL, + false, + false, + false, + false); + if (db == NULL) { Emsg0(M_ERROR_TERM, 0, _("Could not init Bareos database\n")); } if (!db_open_database(NULL, db)) {