]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip_endpoint_identifier_ip: Ensure error defaults to 0. 05/4805/1
authorJoshua Colp <jcolp@digium.com>
Tue, 24 Jan 2017 21:39:39 +0000 (21:39 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 24 Jan 2017 21:41:27 +0000 (15:41 -0600)
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

res/res_pjsip_endpoint_identifier_ip.c

index 63b254da8035d17c1265e65e105c106e7f82152b..116e2d8d71ca220532698cc8342331d5fd8e174f 100644 (file)
@@ -247,7 +247,7 @@ static int ip_identify_match_handler(const struct aco_option *opt, struct ast_va
 
        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;