summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-12-17 12:50:06 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-12-17 12:50:06 -0600
commit0193d97c4766c9431631aacbe1b660351f692eb5 (patch)
tree5b64ae5fd2ec47761a8e726954e85469cad3d188
parentd2c8614122bf0ddd29ab81c238a7f927fb731975 (diff)
parenta2431f83ef01200f59fc6844f3129fddba00398d (diff)
Merge "rtp_engine: Ignore empty filenames in DTLS configuration."
-rw-r--r--main/rtp_engine.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index 24e56b49f..6a7ace7bd 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -2118,14 +2118,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;
}
@@ -2135,14 +2135,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;
}