[asterisk-commits] res pjsip endpoint identifier ip: Ensure error defaults to 0. (asterisk[14])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 26 07:48:25 CST 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4805 )

Change subject: res_pjsip_endpoint_identifier_ip: Ensure error defaults to 0.
......................................................................


res_pjsip_endpoint_identifier_ip: Ensure error defaults to 0.

When configuring a match using a netmask the error variable was
not defaulting to 0. For some people this would cause the code
to think an error occurred when adding the match when in reality
it added perfectly fine.

ASTERISK-26693

Change-Id: I850c250813742bddde65c84e739093c9e01dfe56
---
M res/res_pjsip_endpoint_identifier_ip.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  George Joseph: Looks good to me, approved
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Verified



diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c
index 63b254d..116e2d8 100644
--- a/res/res_pjsip_endpoint_identifier_ip.c
+++ b/res/res_pjsip_endpoint_identifier_ip.c
@@ -247,7 +247,7 @@
 
 	while ((current_string = ast_strip(strsep(&input_string, ",")))) {
 		char *mask = strrchr(current_string, '/');
-		int error;
+		int error = 0;
 
 		if (ast_strlen_zero(current_string)) {
 			continue;

-- 
To view, visit https://gerrit.asterisk.org/4805
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I850c250813742bddde65c84e739093c9e01dfe56
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-commits mailing list