summaryrefslogtreecommitdiff
path: root/res/res_pjsip
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-11-06 09:05:56 -0500
committerSean Bright <sean.bright@gmail.com>2017-11-06 09:15:40 -0500
commitca4e6b568fa2265ef317195114028430641f8a8f (patch)
tree2f107115ac652bf5e393612a62937231ea599e4b /res/res_pjsip
parent3c6fe0545abffd07da0583df07611d5cfac6bc85 (diff)
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 existence should be validated in the 'apply' handler once we have a complete transport definition. ASTERISK-27032 #close Reported by: seanchann.zhou Change-Id: Ie3b5fb421977ccdb33e415d4ec52c3fd192601b7
Diffstat (limited to 'res/res_pjsip')
-rw-r--r--res/res_pjsip/config_transport.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/res/res_pjsip/config_transport.c b/res/res_pjsip/config_transport.c
index 0c804b82a..2f29456ab 100644
--- a/res/res_pjsip/config_transport.c
+++ b/res/res_pjsip/config_transport.c
@@ -683,6 +683,11 @@ static int transport_tls_file_handler(const struct aco_option *opt, struct ast_v
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);