mirror of
https://bitbucket.org/jsuto/piler.git
synced 2026-04-05 18:19:19 +02:00
added customer initial support
This commit is contained in:
18
src/piler.c
18
src/piler.c
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user