From: Marco van Wieringen Date: Tue, 25 Jan 2011 18:12:32 +0000 (+0100) Subject: Fix logic inversion. X-Git-Tag: Release-7.0.0~1200 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1157f172ea1c3b37d6850878688b814aa8eae079;p=bacula%2Fbacula Fix logic inversion. --- diff --git a/bacula/src/tools/bbatch.c b/bacula/src/tools/bbatch.c index 189da9deb7..61f57ae632 100644 --- a/bacula/src/tools/bbatch.c +++ b/bacula/src/tools/bbatch.c @@ -110,7 +110,7 @@ static int list_handler(void *ctx, int num_fields, char **row) int main (int argc, char *argv[]) { int ch; - bool use_batch = true; + bool disable_batch = false; char *restore_list=NULL; setlocale(LC_ALL, ""); bindtextdomain("bacula", LOCALEDIR); @@ -131,10 +131,10 @@ int main (int argc, char *argv[]) restore_list=bstrdup(optarg); break; case 'B': - use_batch = false; + disable_batch = true; break; case 'b': - use_batch = true; + disable_batch = false; break; case 'd': /* debug level */ if (*optarg == 't') { @@ -197,7 +197,7 @@ int main (int argc, char *argv[]) /* To use the -r option, the catalog should already contains records */ if ((db = db_init_database(NULL, NULL, db_name, db_user, db_password, - db_host, 0, NULL, false, use_batch)) == NULL) { + db_host, 0, NULL, false, disable_batch)) == NULL) { Emsg0(M_ERROR_TERM, 0, _("Could not init Bacula database\n")); } if (!db_open_database(NULL, db)) { @@ -215,10 +215,10 @@ int main (int argc, char *argv[]) return 0; } - if (use_batch) { - printf("With new Batch mode\n"); - } else { + if (disable_batch) { printf("Without new Batch mode\n"); + } else { + printf("With new Batch mode\n"); } i = nb;