From 3c4ed238f2679c8c7f3446a8ced44f2c658821e2 Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 19 Feb 2014 15:16:20 +0100 Subject: [PATCH] fixed a reindex vs. folder issue --- src/reindex.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/reindex.c b/src/reindex.c index 109ada85..233926f8 100644 --- a/src/reindex.c +++ b/src/reindex.c @@ -222,6 +222,13 @@ int main(int argc, char **argv){ initrules(data.archiving_rules); initrules(data.retention_rules); + init_session_data(&sdata, &cfg); + + + if(open_database(&sdata, &cfg) == ERR){ + p_clean_exit("cannot connect to mysql server", 1); + } + if(folder){ data.folder = get_folder_id(&sdata, &data, folder, 0); if(data.folder == 0){ @@ -230,13 +237,6 @@ int main(int argc, char **argv){ } } - init_session_data(&sdata, &cfg); - - - if(open_database(&sdata, &cfg) == ERR){ - p_clean_exit("cannot connect to mysql server", 1); - } - load_mydomains(&sdata, &data, &cfg);