[Asterisk-code-review] res pjsip endpoint identifier ip: Ensure error defaults to 0. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue Jan 24 15:41:35 CST 2017


Joshua Colp has uploaded a new change for review. ( https://gerrit.asterisk.org/4806 )

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(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/06/4806/1

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/4806
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I850c250813742bddde65c84e739093c9e01dfe56
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list