aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-06 15:57:25 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-06 15:57:25 +0000
commitb521e61d0f7dcd4bea516f359155bcdc751c3370 (patch)
tree7abb962b6a0f8cff271fcffcc3eac302c4a5c134 /channels
parent3e24f303a373abcd21f0de6c7c89d3a2ded76d73 (diff)
Merged revisions 73678 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r73678 | russell | 2007-07-06 10:55:41 -0500 (Fri, 06 Jul 2007) | 7 lines (closes issue #10125) Reported by: makoto Patches submitted by: makoto This fixes a crash in chan_sip that happens when the bindaddr setting is not valid on Asterisk startup, gets fixed, and then a reload gets issued. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73679 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 2585d5368..92b29c9da 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -15177,8 +15177,12 @@ static void *do_monitor(void *data)
sip_do_reload(sip_reloadreason);
/* Change the I/O fd of our UDP socket */
- if (sipsock > -1)
- sipsock_read_id = ast_io_change(io, sipsock_read_id, sipsock, NULL, 0, NULL);
+ if (sipsock > -1) {
+ if (sipsock_read_id)
+ sipsock_read_id = ast_io_change(io, sipsock_read_id, sipsock, NULL, 0, NULL);
+ else
+ sipsock_read_id = ast_io_add(io, sipsock, sipsock_read, AST_IO_IN, NULL);
+ }
}
/* Check for interfaces needing to be killed */
ast_mutex_lock(&iflock);