[asterisk-commits] simon.perreault: branch group/v6-new r273979 - in /team/group/v6-new: channel...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 5 10:04:31 CDT 2010


Author: simon.perreault
Date: Mon Jul  5 10:04:26 2010
New Revision: 273979

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=273979
Log:
Coding guidelines fixes

Modified:
    team/group/v6-new/channels/chan_sip.c
    team/group/v6-new/include/asterisk/acl.h
    team/group/v6-new/main/acl.c
    team/group/v6-new/main/config.c
    team/group/v6-new/main/netsock2.c
    team/group/v6-new/res/res_rtp_asterisk.c

Modified: team/group/v6-new/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/channels/chan_sip.c?view=diff&rev=273979&r1=273978&r2=273979
==============================================================================
--- team/group/v6-new/channels/chan_sip.c (original)
+++ team/group/v6-new/channels/chan_sip.c Mon Jul  5 10:04:26 2010
@@ -16169,8 +16169,12 @@
 		return 0;	/* don't care, we scan all channels */
 
 	if (!cur->rtp) {
-		if (sipdebug)
-			ast_cli(fd, "%-15.15s  %-11.11s (inv state: %s) -- %s\n", ast_sockaddr_stringify_addr(&cur->sa), cur->callid, invitestate2string[cur->invitestate].desc, "-- No RTP active");
+		if (sipdebug) {
+			ast_cli(fd, "%-15.15s  %-11.11s (inv state: %s) -- %s\n",
+				ast_sockaddr_stringify_addr(&cur->sa), cur->callid,
+				invitestate2string[cur->invitestate].desc,
+				"-- No RTP active");
+		}
 		return 0;	/* don't care, we scan all channels */
 	}
 

Modified: team/group/v6-new/include/asterisk/acl.h
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/include/asterisk/acl.h?view=diff&rev=273979&r1=273978&r2=273979
==============================================================================
--- team/group/v6-new/include/asterisk/acl.h (original)
+++ team/group/v6-new/include/asterisk/acl.h Mon Jul  5 10:04:26 2010
@@ -142,8 +142,8 @@
  * an SRV lookup will be done for "_sip._udp.example.com". If service is NULL,
  * then this function acts exactly like a call to ast_get_ip.
  *
- * \param addr The IP address found.  The address family is used as an input parameter to 
- * filter the returned adresses. if it is 0, both IPv4 and IPv6 addresses 
+ * \param addr The IP address found.  The address family is used as an input parameter to
+ * filter the returned adresses. if it is 0, both IPv4 and IPv6 addresses
  * can be returned.
  *
  * \param value The hostname to look up

Modified: team/group/v6-new/main/acl.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/main/acl.c?view=diff&rev=273979&r1=273978&r2=273979
==============================================================================
--- team/group/v6-new/main/acl.c (original)
+++ team/group/v6-new/main/acl.c Mon Jul  5 10:04:26 2010
@@ -382,8 +382,9 @@
 
 	addrs_cnt = ast_sockaddr_resolve(&addrs, name, flag, family);
 	if (addrs_cnt > 0) {
-		if (addrs_cnt > 1)
+		if (addrs_cnt > 1) {
 			ast_log(LOG_DEBUG, "Multiple addresses. Using the first only\n");
+		}
 		ast_sockaddr_copy(addr, &addrs[0]);
 		ast_free(addrs);
 	} else {
@@ -403,15 +404,18 @@
 
 	if (service) {
 		snprintf(srv, sizeof(srv), "%s.%s", service, value);
-		if ((srv_ret = ast_get_srv(NULL, host, sizeof(host), &tportno, srv)) > 0)
+		if ((srv_ret = ast_get_srv(NULL, host, sizeof(host), &tportno, srv)) > 0) {
 			value = host;
-	}
-
-	if (resolve_first(addr, value, PARSE_PORT_FORBID, addr->ss.ss_family) != 0)
+		}
+	}
+
+	if (resolve_first(addr, value, PARSE_PORT_FORBID, addr->ss.ss_family) != 0) {
 		return -1;
-
-	if (srv_ret > 0)
+	}
+
+	if (srv_ret > 0) {
 		ast_sockaddr_set_port(addr, tportno);
+	}
 
 	return 0;
 }

Modified: team/group/v6-new/main/config.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/main/config.c?view=diff&rev=273979&r1=273978&r2=273979
==============================================================================
--- team/group/v6-new/main/config.c (original)
+++ team/group/v6-new/main/config.c Mon Jul  5 10:04:26 2010
@@ -2391,8 +2391,9 @@
 	    {
 		struct ast_sockaddr *addr = (struct ast_sockaddr *)p_result;
 
-		if (!ast_sockaddr_parse(addr, arg, flags & PARSE_PORT_MASK))
+		if (!ast_sockaddr_parse(addr, arg, flags & PARSE_PORT_MASK)) {
 			error = 1;
+		}
 
 		ast_debug(3, "extract addr from %s gives %s(%d)\n",
 			  arg, ast_sockaddr_stringify(addr), error);

Modified: team/group/v6-new/main/netsock2.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/main/netsock2.c?view=diff&rev=273979&r1=273978&r2=273979
==============================================================================
--- team/group/v6-new/main/netsock2.c (original)
+++ team/group/v6-new/main/netsock2.c Mon Jul  5 10:04:26 2010
@@ -127,11 +127,12 @@
 	*port = NULL;
 	if (*s == '[') {
 		*host = ++s;
-		for (; *s && *s != ']'; ++s)
-			;
+		for (; *s && *s != ']'; ++s) {
+		}
 		if (*s == ']') {
 			*s++ = '\0';
-		if (*s == ':')
+		}
+		if (*s == ':') {
 			*port = s + 1;
 		}
 	} else {
@@ -141,8 +142,9 @@
 				if (*port) {
 					*port = NULL;
 					break;
-				} else
+				} else {
 					*port = s;
+				}
 			}
 		}
 		if (*port) {

Modified: team/group/v6-new/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/group/v6-new/res/res_rtp_asterisk.c?view=diff&rev=273979&r1=273978&r2=273979
==============================================================================
--- team/group/v6-new/res/res_rtp_asterisk.c (original)
+++ team/group/v6-new/res/res_rtp_asterisk.c Mon Jul  5 10:04:26 2010
@@ -2351,9 +2351,10 @@
 	if (rtp->rtcp) {
 		ast_debug(1, "Setting RTCP address on RTP instance '%p'\n", instance);
 		ast_sockaddr_copy(&rtp->rtcp->them, addr);
-		if (!ast_sockaddr_isnull(addr))
+		if (!ast_sockaddr_isnull(addr)) {
 			ast_sockaddr_set_port(&rtp->rtcp->them,
 					      ast_sockaddr_port(addr) + 1);
+		}
 	}
 
 	rtp->rxseqno = 0;




More information about the asterisk-commits mailing list