[asterisk-commits] Avoid setting maxfiles for a remote asterisk (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 12 04:24:26 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5990 )

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(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/main/asterisk.c b/main/asterisk.c
index e256276..ac078dd 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3811,7 +3811,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/5990
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf9eb344e4b4b517df91b736b27ec55f6a6921a2
Gerrit-Change-Number: 5990
Gerrit-PatchSet: 1
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170712/2fe66c75/attachment-0001.html>


More information about the asterisk-commits mailing list