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) */
/* 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 */
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);