]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Avoid setting maxfiles for a remote asterisk
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Mon, 3 Jul 2017 12:30:37 +0000 (15:30 +0300)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Tue, 11 Jul 2017 17:52:09 +0000 (12:52 -0500)
Setting maxfiles (maximum number of open files) has no practical
effect on a remote asterisk (rasterisk, rasterisk -x).

It has an ill effect of printing an extra message, which
may be annoying in case of -x.

ASTERISK-27105 #close

Change-Id: Iaf9eb344e4b4b517df91b736b27ec55f6a6921a2

main/asterisk.c

index 49db383f6d18d6ed05bbaf8301eb4577c4fa8751..753ccf61d2f8ef8e28535a3220d1ed0046a305ef 100644 (file)
@@ -3727,7 +3727,9 @@ static void ast_readconfig(void)
                /* Set the maximum amount of open files */
                } else if (!strcasecmp(v->name, "maxfiles")) {
                        ast_option_maxfiles = atoi(v->value);
-                       set_ulimit(ast_option_maxfiles);
+                       if (!ast_opt_remote) {
+                               set_ulimit(ast_option_maxfiles);
+                       }
                /* What user to run as */
                } else if (!strcasecmp(v->name, "runuser")) {
                        ast_copy_string(cfg_paths.run_user, v->value, sizeof(cfg_paths.run_user));