From: Moises Silva Date: Tue, 31 Jan 2012 21:56:29 +0000 (-0500) Subject: Merge branch 'master' into smgmaster X-Git-Tag: v1.2.3^2~71^2^2~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94ceff6842d4a01d45515c77e59c1f07dea7ce7e;p=thirdparty%2Ffreeswitch.git Merge branch 'master' into smgmaster Conflicts: build/modules.conf.in src/mod/loggers/mod_logfile/mod_logfile.c --- 94ceff6842d4a01d45515c77e59c1f07dea7ce7e diff --cc libs/esl/fs_cli.c index 53d1bdfce4,36651e49d8..faac75a437 --- a/libs/esl/fs_cli.c +++ b/libs/esl/fs_cli.c @@@ -1105,16 -1114,15 +1104,15 @@@ int main(int argc, char *argv[] 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[] = { diff --cc src/mod/loggers/mod_logfile/mod_logfile.c index c616a2daaf,db78909134..9e16f5d73e --- a/src/mod/loggers/mod_logfile/mod_logfile.c +++ b/src/mod/loggers/mod_logfile/mod_logfile.c @@@ -337,14 -332,11 +343,16 @@@ static switch_status_t load_profile(swi 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;