[Asterisk-code-review] res pjsip: Ignore empty TLS configuration (asterisk[13])
Sean Bright
asteriskteam at digium.com
Mon Nov 6 08:13:56 CST 2017
Sean Bright has uploaded this change for review. ( https://gerrit.asterisk.org/7004
Change subject: res_pjsip: Ignore empty TLS configuration
......................................................................
res_pjsip: Ignore empty TLS configuration
When using realtime, fields that are not explicitly set by an
administrator are still presented to sorcery as empty strings. Handle
this case explicitly.
In this particular case, if any of these fields are required for TLS
support, their existance should be validated in the 'apply' handler once
we have a complete transport definition.
ASTERISK-27032 #close
Reported by: seanchann.zhou
Change-Id: Ie3b5fb421977ccdb33e415d4ec52c3fd192601b7
---
M res/res_pjsip/config_transport.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/04/7004/1
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index 0c804b8..2f29456 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -683,6 +683,11 @@
return -1;
}
+ if (ast_strlen_zero(var->value)) {
+ /* Ignore empty options */
+ return 0;
+ }
+
if (!ast_file_is_readable(var->value)) {
ast_log(LOG_ERROR, "Transport: %s: %s %s is either missing or not readable\n",
ast_sorcery_object_get_id(obj), var->name, var->value);
--
To view, visit https://gerrit.asterisk.org/7004
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3b5fb421977ccdb33e415d4ec52c3fd192601b7
Gerrit-Change-Number: 7004
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171106/cf3774ff/attachment.html>
More information about the asterisk-code-review
mailing list