summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2011-08-15 13:27:06 +0000
committerOlle Johansson <oej@edvina.net>2011-08-15 13:27:06 +0000
commit6b7e997df253514ab1804a6e04a8286d74fb040b (patch)
tree054709d7052f120908312e1d4b8eecf4846760b2 /channels
parentc9f65ece49ead5c21a85eaeb0328d47db3edebf0 (diff)
Formatting guideline fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index ed828a57c..71d5d5d84 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -25697,8 +25697,9 @@ static void *do_monitor(void *data)
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 @@ static void *do_monitor(void *data)
/* 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 @@ static void *do_monitor(void *data)
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);
}