added customer initial support

This commit is contained in:
SJ
2013-05-15 11:46:08 +02:00
parent 63899aa025
commit 4853694fcd
11 changed files with 506 additions and 27 deletions

View File

@@ -231,6 +231,10 @@ void p_clean_exit(){
free_rule(data.archiving_rules);
free_rule(data.retention_rules);
#ifdef HAVE_MULTITENANCY
free_list(data.customers);
#endif
syslog(LOG_PRIORITY, "%s has been terminated", PROGNAME);
unlink(cfg.pidfile);
@@ -304,10 +308,17 @@ void initialise_configuration(){
free_rule(data.archiving_rules);
free_rule(data.retention_rules);
#ifdef HAVE_MULTITENANCY
free_list(data.customers);
#endif
data.folder = 0;
data.recursive_folder_names = 0;
data.archiving_rules = NULL;
data.retention_rules = NULL;
#ifdef HAVE_MULTITENANCY
data.customers = NULL;
#endif
memset(data.starttls, 0, sizeof(data.starttls));
@@ -327,6 +338,10 @@ void initialise_configuration(){
load_mydomains(&sdata, &data, &cfg);
#ifdef HAVE_MULTITENANCY
load_customers(&sdata, &data, &cfg);
#endif
if(cfg.server_id > 0) insert_offset(&sdata, cfg.server_id);
close_database(&sdata);
@@ -374,6 +389,9 @@ int main(int argc, char **argv){
data.recursive_folder_names = 0;
data.archiving_rules = NULL;
data.retention_rules = NULL;
#ifdef HAVE_MULTITENANCY
data.customers = NULL;
#endif
data.ctx = NULL;
data.ssl = NULL;