mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
FS-7284 allow -base to satisfy "You must specify all or none of -conf, -log, and -db"
This commit is contained in:
parent
69a7b5fd11
commit
ded03004a2
@ -519,7 +519,7 @@ int main(int argc, char *argv[])
|
|||||||
char *local_argv[1024] = { 0 };
|
char *local_argv[1024] = { 0 };
|
||||||
int local_argc = argc;
|
int local_argc = argc;
|
||||||
char *arg_argv[128] = { 0 };
|
char *arg_argv[128] = { 0 };
|
||||||
int alt_dirs = 0, log_set = 0, run_set = 0, do_kill = 0;
|
int alt_dirs = 0, alt_base = 0, log_set = 0, run_set = 0, do_kill = 0;
|
||||||
int priority = 0;
|
int priority = 0;
|
||||||
#ifdef __sun
|
#ifdef __sun
|
||||||
switch_core_flag_t flags = SCF_USE_SQL;
|
switch_core_flag_t flags = SCF_USE_SQL;
|
||||||
@ -898,6 +898,7 @@ int main(int argc, char *argv[])
|
|||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
strcpy(SWITCH_GLOBAL_dirs.base_dir, local_argv[x]);
|
strcpy(SWITCH_GLOBAL_dirs.base_dir, local_argv[x]);
|
||||||
|
alt_base = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (!strcmp(local_argv[x], "-temp")) {
|
else if (!strcmp(local_argv[x], "-temp")) {
|
||||||
@ -1046,7 +1047,7 @@ int main(int argc, char *argv[])
|
|||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alt_dirs && alt_dirs != 3) {
|
if (alt_dirs && alt_dirs != 3 && !alt_base) {
|
||||||
fprintf(stderr, "You must specify all or none of -conf, -log, and -db\n");
|
fprintf(stderr, "You must specify all or none of -conf, -log, and -db\n");
|
||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user