char cmd_str[1024] = "";
cli_profile_t *profile = NULL;
#ifndef WIN32
- char hfile[512] = "/tmp/fs_cli_history";
- char cfile[512] = "/etc/fs_cli.conf";
- char dft_cfile[512] = "/etc/fs_cli.conf";
+ char hfile[512] = "/etc/nbess7_cli_history";
+ char cfile[512] = "/etc/nbess7_cli.conf";
+ char dft_cfile[512] = "/etc/nbess7_cli.conf";
#else
- char hfile[512] = "fs_cli_history";
- char cfile[512] = "fs_cli.conf";
- char dft_cfile[512] = "fs_cli.conf";
+ char hfile[512] = "nbess7_cli_history";
+ char cfile[512] = "nbess7_cli.conf";
+ char dft_cfile[512] = "nbess7_cli.conf";
#endif
char *home = getenv("HOME");
- char *term = getenv("TERM");
/* Vars for optargs */
int opt;
static struct option options[] = {
if (!strcmp(var, "logfile")) {
new_profile->logfile = strdup(val);
} else if (!strcmp(var, "rollover")) {
- new_profile->roll_size = atoi(val);
- if (new_profile->roll_size < 0) {
- new_profile->roll_size = 0;
- }
- } else if (!strcmp(var, "maxfilecount")) {
- new_profile->max_file_count = atoi(val);
- if (new_profile->max_file_count < 1) {
- new_profile->max_file_count = 1;
+ new_profile->roll_size = switch_atoui(val);
- } else if (!strcmp(var, "maximum-rotate")) {
++ } else if (!strcmp(var, "maximum-rotate")) ||
++ (!strcmp(var, "maxfilecount")) {
++ /* maxfilecount is backwards compatible parameter, we had our own log rotation code
++ * and eventually mainstream FreeSWITCH included the parameter maximum-rotate which
++ * did pretty much the same as ours, I deleted the old code and stayed with the official
++ * project rotation code */
+ new_profile->max_rot = switch_atoui(val);
+ if (new_profile->max_rot == 0) {
+ new_profile->max_rot = MAX_ROT;
}
} else if (!strcmp(var, "uuid") && switch_true(val)) {
new_profile->log_uuid = SWITCH_TRUE;