[Asterisk-code-review] Avoid setting maxfiles for a remote asterisk (asterisk[master])

Tzafrir Cohen asteriskteam at digium.com
Mon Jul 3 07:38:19 CDT 2017


Tzafrir Cohen has uploaded this change for review. ( https://gerrit.asterisk.org/5951


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 a n 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/51/5951/1

diff --git a/main/asterisk.c b/main/asterisk.c
index 16313ea..a6e2149 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3681,7 +3681,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/5951
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf9eb344e4b4b517df91b736b27ec55f6a6921a2
Gerrit-Change-Number: 5951
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/20170703/9822b798/attachment.html>


More information about the asterisk-code-review mailing list