diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2017-07-03 15:30:37 +0300 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2017-07-11 12:51:40 -0500 |
commit | 4f2f3bfebfb3a49a0fe407aaba6608114f8bd0bf (patch) | |
tree | 9db67d42b51e7fe66834904e961db58ac962774f | |
parent | 1498d66f69f10d71eb0b8b040e82a6d2e6d1f51e (diff) |
Avoid setting maxfiles for a remote asterisk
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
-rw-r--r-- | main/asterisk.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index e2562764a..ac078dd7a 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -3811,7 +3811,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)); |