[Asterisk-code-review] res pjsip endpoint identifier ip: Don't output error if no h... (asterisk[master])
Anonymous Coward
asteriskteam at digium.com
Wed Mar 15 19:01:40 CDT 2017
Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5216 )
Change subject: res_pjsip_endpoint_identifier_ip: Don't output error if no header_match.
......................................................................
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
---
M res/res_pjsip_endpoint_identifier_ip.c
1 file changed, 6 insertions(+), 1 deletion(-)
Approvals:
Mark Michelson: Looks good to me, approved
George Joseph: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Sean Bright: Looks good to me, but someone else must approve
diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c
index 262bdc5..30bfc26 100644
--- a/res/res_pjsip_endpoint_identifier_ip.c
+++ b/res/res_pjsip_endpoint_identifier_ip.c
@@ -140,9 +140,14 @@
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",
--
To view, visit https://gerrit.asterisk.org/5216
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I239bc6d2319dd3da24ba96a38d4d6e9b5526d62a
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
More information about the asterisk-code-review
mailing list