[asterisk-commits] oej: trunk r331830 - /trunk/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 15 08:27:11 CDT 2011


Author: oej
Date: Mon Aug 15 08:27:06 2011
New Revision: 331830

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=331830
Log:
Formatting guideline fixes

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=331830&r1=331829&r2=331830
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Aug 15 08:27:06 2011
@@ -25697,8 +25697,9 @@
 	int reloading;
 
 	/* Add an I/O event to our SIP UDP socket */
-	if (sipsock > -1)
+	if (sipsock > -1) {
 		sipsock_read_id = ast_io_add(io, sipsock, sipsock_read, AST_IO_IN, NULL);
+	}
 
 	/* From here on out, we die whenever asked */
 	for(;;) {
@@ -25713,10 +25714,11 @@
 
 			/* Change the I/O fd of our UDP socket */
 			if (sipsock > -1) {
-				if (sipsock_read_id)
+				if (sipsock_read_id) {
 					sipsock_read_id = ast_io_change(io, sipsock_read_id, sipsock, NULL, 0, NULL);
-				else
+				} else {
 					sipsock_read_id = ast_io_add(io, sipsock, sipsock_read, AST_IO_IN, NULL);
+				}
 			} else if (sipsock_read_id) {
 				ast_io_remove(io, sipsock_read_id);
 				sipsock_read_id = NULL;
@@ -25744,15 +25746,18 @@
 		pthread_testcancel();
 		/* Wait for sched or io */
 		res = ast_sched_wait(sched);
-		if ((res < 0) || (res > 1000))
+		if ((res < 0) || (res > 1000)) {
 			res = 1000;
+		}
 		res = ast_io_wait(io, res);
-		if (res > 20)
+		if (res > 20) {
 			ast_debug(1, "chan_sip: ast_io_wait ran %d all at once\n", res);
+		}
 		ast_mutex_lock(&monlock);
 		res = ast_sched_runq(sched);
-		if (res >= 20)
+		if (res >= 20) {
 			ast_debug(1, "chan_sip: ast_sched_runq ran %d all at once\n", res);
+		}
 		ast_mutex_unlock(&monlock);
 	}
 




More information about the asterisk-commits mailing list