]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Merge branch 'master' into smgmaster
authorMoises Silva <moy@sangoma.com>
Tue, 31 Jan 2012 21:56:29 +0000 (16:56 -0500)
committerMoises Silva <moy@sangoma.com>
Tue, 31 Jan 2012 21:56:29 +0000 (16:56 -0500)
Conflicts:
build/modules.conf.in
src/mod/loggers/mod_logfile/mod_logfile.c

1  2 
libs/esl/fs_cli.c
src/mod/applications/mod_commands/mod_commands.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/loggers/mod_logfile/mod_logfile.c
src/switch.c
src/switch_apr.c
src/switch_core.c

index 53d1bdfce4f69d6828c3e0875053647e84b4cccd,36651e49d8e8ce85d9051813f36c28a9e545318a..faac75a437c0c2e0c7f52424187644db0ef545c0
@@@ -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[] = {
index c616a2daafbc5f2de625ff3a63dbbf7afd14b0ff,db78909134ac953bce91dd1596fe9f72076bddc0..9e16f5d73e6a835a6a3d5cbb108a771c75d3f573
@@@ -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;
diff --cc src/switch.c
Simple merge
Simple merge
Simple merge