From 653f74d732fa9e3b9a6e28a8d38582b28a8a1bf1 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 10 Apr 2010 12:14:08 +0200 Subject: [PATCH] Revert "Make the batch insert functions return bool instead of int." This reverts commit 58a085a309bfe9982b9a3bca71d3051aa79d180f. --- bacula/src/cats/cats.h | 6 +++--- bacula/src/cats/ingres.c | 20 +++----------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/bacula/src/cats/cats.h b/bacula/src/cats/cats.h index 96982be16c..688bff4935 100644 --- a/bacula/src/cats/cats.h +++ b/bacula/src/cats/cats.h @@ -601,10 +601,10 @@ INGRES_FIELD * my_ingres_fetch_field(B_DB *mdb); void my_ingres_close (B_DB *mdb); int my_ingres_insert_id (B_DB *mdb, const char *query, const char *table_name); -bool my_ingres_batch_start(JCR *jcr, B_DB *mdb); -bool my_ingres_batch_end(JCR *jcr, B_DB *mdb, const char *error); +int my_ingres_batch_start(JCR *jcr, B_DB *mdb); +int my_ingres_batch_end(JCR *jcr, B_DB *mdb, const char *error); typedef struct ATTR_DBR ATTR_DBR; -bool my_ingres_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar); +int my_ingres_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar); char *my_ingres_copy_escape(char *dest, char *src, size_t len); extern const char* my_ingres_batch_lock_path_query; diff --git a/bacula/src/cats/ingres.c b/bacula/src/cats/ingres.c index b966840a74..b44a3f683e 100755 --- a/bacula/src/cats/ingres.c +++ b/bacula/src/cats/ingres.c @@ -728,12 +728,7 @@ bail_out: } #ifdef HAVE_BATCH_FILE_INSERT - -/* - * Returns true if OK - * false if failed - */ -bool my_ingres_batch_start(JCR *jcr, B_DB *mdb) +int my_ingres_batch_start(JCR *jcr, B_DB *mdb) { bool ok; @@ -751,11 +746,7 @@ bool my_ingres_batch_start(JCR *jcr, B_DB *mdb) return ok; } -/* - * Returns true if OK - * false if failed - */ -bool my_ingres_batch_end(JCR *jcr, B_DB *mdb, const char *error) +int my_ingres_batch_end(JCR *jcr, B_DB *mdb, const char *error) { if (mdb) { mdb->status = 0; @@ -763,11 +754,7 @@ bool my_ingres_batch_end(JCR *jcr, B_DB *mdb, const char *error) return true; } -/* - * Returns true if OK - * false if failed - */ -bool my_ingres_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) +int my_ingres_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) { size_t len; const char *digest; @@ -791,7 +778,6 @@ bool my_ingres_batch_insert(JCR *jcr, B_DB *mdb, ATTR_DBR *ar) return INSERT_DB(jcr, mdb, mdb->cmd); } - #endif /* HAVE_BATCH_FILE_INSERT */ /* -- 2.39.5