diff options
author | Joshua Colp <jcolp@digium.com> | 2017-03-15 13:44:43 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2017-03-15 07:46:37 -0600 |
commit | a6dddc4a32980acf4251d3d15a11ef843e757341 (patch) | |
tree | 1ac5a667259bbc4d322202a6f1b0e80367ffb609 | |
parent | 77334fcd6c647f7b30ef9d1af311c593ebe34ea9 (diff) |
res_pjsip_endpoint_identifier_ip: Don't output error if no header_match.
This change ensures that if no header_match option is set on an
identify an error message is not output stating the option is set
to an invalid value.
ASTERISK-26863
Change-Id: I239bc6d2319dd3da24ba96a38d4d6e9b5526d62a
-rw-r--r-- | res/res_pjsip_endpoint_identifier_ip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c index 262bdc5f3..30bfc2618 100644 --- a/res/res_pjsip_endpoint_identifier_ip.c +++ b/res/res_pjsip_endpoint_identifier_ip.c @@ -140,9 +140,14 @@ static int header_identify_match_check(void *obj, void *arg, int flags) pjsip_generic_string_hdr *header; pj_str_t pj_header_name; pj_str_t pj_header_value; - char *c_header = ast_strdupa(identify->match_header); + char *c_header; char *c_value; + if (ast_strlen_zero(identify->match_header)) { + return 0; + } + + c_header = ast_strdupa(identify->match_header); c_value = strchr(c_header, ':'); if (!c_value) { ast_log(LOG_WARNING, "Identify '%s' has invalid header_match: No ':' separator found!\n", |