[asterisk-commits] marquis: branch group/pinana-publish-1.4 r286375 - /team/group/pinana-publish...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Sep 12 05:39:44 CDT 2010


Author: marquis
Date: Sun Sep 12 05:39:37 2010
New Revision: 286375

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=286375
Log:
Fix formatting to match coding guidelines.

Modified:
    team/group/pinana-publish-1.4/channels/chan_sip.c

Modified: team/group/pinana-publish-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pinana-publish-1.4/channels/chan_sip.c?view=diff&rev=286375&r1=286374&r2=286375
==============================================================================
--- team/group/pinana-publish-1.4/channels/chan_sip.c (original)
+++ team/group/pinana-publish-1.4/channels/chan_sip.c Sun Sep 12 05:39:37 2010
@@ -9742,27 +9742,32 @@
 	AST_LIST_TRAVERSE(&interfaces, curint, list) {
 		char *slash_pos;
 		ast_copy_string(interface, curint->interface, sizeof(interface));
-		if ((slash_pos = strchr(interface, '/')))
-			if ((slash_pos = strchr(slash_pos + 1, '/')))
+		if ((slash_pos = strchr(interface, '/'))) {
+			if ((slash_pos = strchr(slash_pos + 1, '/'))) {
 				*slash_pos = '\0';
-
-		if (!strcasecmp(interface, sc->dev))
+			}
+		}
+
+		if (!strcasecmp(interface, sc->dev)) {
 			break;
+		}
 	}
 	AST_LIST_UNLOCK(&interfaces);
 
 	if (!curint) {
-		if (option_debug > 2)
+		if (option_debug > 2) {
 			ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
+		}
 		return NULL;
 	}
 
-	if (option_debug)
+	if (option_debug) {
 		ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
+	}
 
 	update_status(sc->dev, sc->state);
-
-	*/return NULL;
+	*/
+	return NULL;
 }
 
 /*! \brief Consumer of the statechange queue */
@@ -9811,8 +9816,9 @@
 {
 	struct statechange *sc;
 
-	if (!(sc = ast_calloc(1, sizeof(*sc) + strlen(dev) + 1)))
+	if (!(sc = ast_calloc(1, sizeof(*sc) + strlen(dev) + 1))) {
 		return 0;
+	}
 
 	sc->state = state;
 	strcpy(sc->dev, dev);




More information about the asterisk-commits mailing list