summaryrefslogtreecommitdiff
path: root/main/asterisk.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2017-07-03 15:30:37 +0300
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2017-07-11 20:46:42 +0300
commitd58ef31acd94217ad51a8b91bb1a3e02fb2579af (patch)
treebe4ddd9e138b9c19a34ba56a6d389ad94485ee0f /main/asterisk.c
parentb62a3f0a67628e99cfceca36bafb1362788700ff (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
Diffstat (limited to 'main/asterisk.c')
-rw-r--r--main/asterisk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 16313ea68..a6e2149a7 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3681,7 +3681,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));