[Asterisk-code-review] Config: ignore wrong codec name while process allow/disallow... (asterisk[13])

Alexei Gradinari asteriskteam at digium.com
Mon Apr 11 17:11:22 CDT 2016


Alexei Gradinari has uploaded a new change for review.

  https://gerrit.asterisk.org/2573

Change subject: Config: ignore wrong codec name while process allow/disallow opts.
......................................................................

Config: ignore wrong codec name while process allow/disallow opts.

Failed registration using PJSIP/Realtime if one of the codec name
is wrong in allow/disallow options.

This patch ignores parsing error.

ASTERISK-25914

Change-Id: I23f5f8bea641ba16e4fc7498d9ba79eab5f4432d
---
M main/config_options.c
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/73/2573/1

diff --git a/main/config_options.c b/main/config_options.c
index db99a44..b5b0444 100644
--- a/main/config_options.c
+++ b/main/config_options.c
@@ -730,8 +730,14 @@
 #endif
 
 	if (opt->handler(opt, var, obj)) {
-		ast_log(LOG_ERROR, "Error parsing %s=%s at line %d of %s\n", var->name, var->value, var->lineno, var->file);
-		return -1;
+		switch (opt->type) {
+		case OPT_CODEC_T:
+			ast_log(LOG_WARNING, "Error parsing %s=%s at line %d of %s, ignoring it\n", var->name, var->value, var->lineno, var->file);
+			break;
+		default:
+			ast_log(LOG_ERROR, "Error parsing %s=%s at line %d of %s\n", var->name, var->value, var->lineno, var->file);
+			return -1;
+		}
 	}
 
 	return 0;

-- 
To view, visit https://gerrit.asterisk.org/2573
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23f5f8bea641ba16e4fc7498d9ba79eab5f4432d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>



More information about the asterisk-code-review mailing list