diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-02 21:02:14 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-02 21:02:14 +0000 |
commit | ef78b6ac9472e520bac57254649ac96ae5dd2992 (patch) | |
tree | 9b6d83b844ec9cb7a088b564212c69525fbfa5a4 | |
parent | d72005502a7d75ae87f0acdd5e2e5a27def8c946 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@44230 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index db02bb60b..3bf9f8a64 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -442,6 +442,7 @@ static int expiry = DEFAULT_EXPIRY; static struct sched_context *sched; static struct io_context *io; +static int *sipsock_read_id; #define SIP_MAX_HEADERS 64 /*!< Max amount of SIP headers to read */ #define SIP_MAX_LINES 64 /*!< Max amount of lines in SIP attachment (like SDP) */ @@ -11551,7 +11552,7 @@ static void *do_monitor(void *data) /* Add an I/O event to our UDP socket */ if (sipsock > -1) - ast_io_add(io, sipsock, sipsock_read, AST_IO_IN, NULL); + sipsock_read_id = ast_io_add(io, sipsock, sipsock_read, AST_IO_IN, NULL); /* This thread monitors all the frame relay interfaces which are not yet in use (and thus do not have a separate thread) indefinitely */ @@ -11566,6 +11567,10 @@ static void *do_monitor(void *data) if (option_verbose > 0) ast_verbose(VERBOSE_PREFIX_1 "Reloading SIP\n"); sip_do_reload(); + + /* 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); } /* Check for interfaces needing to be killed */ ast_mutex_lock(&iflock); |