[Asterisk-code-review] Avoid setting maxfiles for a remote asterisk (asterisk[14])
Tzafrir Cohen
asteriskteam at digium.com
Tue Jul 11 12:52:10 CDT 2017
Tzafrir Cohen has uploaded this change for review. ( https://gerrit.asterisk.org/5991
Change subject: Avoid setting maxfiles for a remote asterisk
......................................................................
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
---
M main/asterisk.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/91/5991/1
diff --git a/main/asterisk.c b/main/asterisk.c
index 49db383..753ccf6 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3727,7 +3727,9 @@
/* 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));
--
To view, visit https://gerrit.asterisk.org/5991
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf9eb344e4b4b517df91b736b27ec55f6a6921a2
Gerrit-Change-Number: 5991
Gerrit-PatchSet: 1
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170711/1b8ea239/attachment.html>
More information about the asterisk-code-review
mailing list