diff options
author | Joshua Colp <jcolp@digium.com> | 2015-12-17 12:50:01 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-12-17 12:50:01 -0600 |
commit | 51a2cab780825ecaac9b702ab0b180e887bd5fc8 (patch) | |
tree | cca5401ce6746240ac32bc06f5daf4f7dcab7cf2 | |
parent | 158a0a54223c0314c8a4b07ab6982fe5db0942b7 (diff) | |
parent | 0cefcabd589bf8ecf33988d7c710932ab01037e5 (diff) |
Merge "rtp_engine: Ignore empty filenames in DTLS configuration." into 13
-rw-r--r-- | main/rtp_engine.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/rtp_engine.c b/main/rtp_engine.c index beda8cd74..7c5ef311a 100644 --- a/main/rtp_engine.c +++ b/main/rtp_engine.c @@ -1634,14 +1634,14 @@ int ast_rtp_dtls_cfg_parse(struct ast_rtp_dtls_cfg *dtls_cfg, const char *name, } } else if (!strcasecmp(name, "dtlscertfile")) { ast_free(dtls_cfg->certfile); - if (!ast_file_is_readable(value)) { + if (!ast_strlen_zero(value) && !ast_file_is_readable(value)) { ast_log(LOG_ERROR, "%s file %s does not exist or is not readable\n", name, value); return -1; } dtls_cfg->certfile = ast_strdup(value); } else if (!strcasecmp(name, "dtlsprivatekey")) { ast_free(dtls_cfg->pvtfile); - if (!ast_file_is_readable(value)) { + if (!ast_strlen_zero(value) && !ast_file_is_readable(value)) { ast_log(LOG_ERROR, "%s file %s does not exist or is not readable\n", name, value); return -1; } @@ -1651,14 +1651,14 @@ int ast_rtp_dtls_cfg_parse(struct ast_rtp_dtls_cfg *dtls_cfg, const char *name, dtls_cfg->cipher = ast_strdup(value); } else if (!strcasecmp(name, "dtlscafile")) { ast_free(dtls_cfg->cafile); - if (!ast_file_is_readable(value)) { + if (!ast_strlen_zero(value) && !ast_file_is_readable(value)) { ast_log(LOG_ERROR, "%s file %s does not exist or is not readable\n", name, value); return -1; } dtls_cfg->cafile = ast_strdup(value); } else if (!strcasecmp(name, "dtlscapath") || !strcasecmp(name, "dtlscadir")) { ast_free(dtls_cfg->capath); - if (!ast_file_is_readable(value)) { + if (!ast_strlen_zero(value) && !ast_file_is_readable(value)) { ast_log(LOG_ERROR, "%s file %s does not exist or is not readable\n", name, value); return -1; } |