mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 00:00:44 +00:00
iax
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2644 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
104e82c91e
commit
acc81d7b55
@ -904,6 +904,7 @@ int __iax_shutdown(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (netfd > -1) {
|
if (netfd > -1) {
|
||||||
|
shutdown(netfd, 2);
|
||||||
close(netfd);
|
close(netfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ static struct {
|
|||||||
char *codec_rates[SWITCH_MAX_CODECS];
|
char *codec_rates[SWITCH_MAX_CODECS];
|
||||||
int codec_rates_last;
|
int codec_rates_last;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
switch_port_t fd;
|
||||||
} globals;
|
} globals;
|
||||||
|
|
||||||
struct private_object {
|
struct private_object {
|
||||||
@ -916,7 +917,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
|
|||||||
|
|
||||||
iax_set_error(iax_err_cb);
|
iax_set_error(iax_err_cb);
|
||||||
iax_set_output(iax_out_cb);
|
iax_set_output(iax_out_cb);
|
||||||
//netfd = iax_get_fd();
|
globals.fd = iax_get_fd();
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "IAX Ready Port %d\n", globals.port);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "IAX Ready Port %d\n", globals.port);
|
||||||
|
|
||||||
@ -933,9 +934,10 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Wait for an event. */
|
/* Wait for an event. */
|
||||||
if ((iaxevent = iax_get_event(0)) == NULL) {
|
if ((iaxevent = iax_get_event(-1)) == NULL) {
|
||||||
switch_yield(100);
|
//switch_yield(100);
|
||||||
continue;
|
//continue;
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
struct private_object *tech_pvt = iax_get_private(iaxevent->session);
|
struct private_object *tech_pvt = iax_get_private(iaxevent->session);
|
||||||
|
|
||||||
@ -1160,6 +1162,10 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
|
|||||||
|
|
||||||
running = -1;
|
running = -1;
|
||||||
|
|
||||||
|
if (globals.fd) {
|
||||||
|
/* Die Mutha $%#$@% Die Mutha $#%#$^ Die*/
|
||||||
|
shutdown(globals.fd, 2);
|
||||||
|
}
|
||||||
iax_shutdown();
|
iax_shutdown();
|
||||||
|
|
||||||
while (running) {
|
while (running) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user