Browse Source

registrar: test returned value for socket when socket flag is set and xavp is used to hold it

Daniel-Constantin Mierla 11 years ago
parent
commit
4dd1387aad
1 changed files with 2 additions and 4 deletions
  1. 2 4
      modules/registrar/save.c

+ 2 - 4
modules/registrar/save.c

@@ -171,11 +171,9 @@ static struct socket_info *get_sock_val(struct sip_msg *msg)
 	} else {
 	} else {
 		/* xavp */
 		/* xavp */
 		if(reg_xavp_cfg.s!=NULL)
 		if(reg_xavp_cfg.s!=NULL)
-		{
 			vavp = xavp_get_child_with_sval(&reg_xavp_cfg, &xsockname);
 			vavp = xavp_get_child_with_sval(&reg_xavp_cfg, &xsockname);
-			if(vavp==NULL || vavp->val.v.s.len<=0)
-				return 0;
-		}
+		if(vavp==NULL || vavp->val.v.s.len<=0)
+			return 0;
 		socks = vavp->val.v.s;
 		socks = vavp->val.v.s;
 	}
 	}
 	if (parse_phostport( socks.s, &hosts.s, &hosts.len,
 	if (parse_phostport( socks.s, &hosts.s, &hosts.len,