summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzuul <zuul@gerrit.asterisk.org>2017-03-15 16:27:42 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-03-15 16:27:43 -0500
commit481ed5c8f133aa40c2456f575ad154d2ecb5bc82 (patch)
treeb81046104ded46e0100639dbc60ebddae1b64a7e
parentaa5d108caa7aec38290224ea0bd8284354d97bfa (diff)
parent7612601964d6b63cb48324e99edb54bd77ba8e0b (diff)
Merge "res_pjsip_endpoint_identifier_ip: Don't output error if no header_match." into 13
-rw-r--r--res/res_pjsip_endpoint_identifier_ip.c7
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 1bd7e892d..f935882c9 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",