From f27b9f5b9f640bee44002b2aad204e7f738515fc Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 22 Mar 2006 20:55:58 +0000 Subject: [PATCH] tweak git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@901 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_channel.h | 4 ++-- src/mod/endpoints/mod_wanpipe/mod_wanpipe.c | 9 +++++---- src/switch_channel.c | 2 +- src/switch_ivr.c | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/include/switch_channel.h b/src/include/switch_channel.h index 0884bbe7eb..762f610708 100644 --- a/src/include/switch_channel.h +++ b/src/include/switch_channel.h @@ -275,9 +275,9 @@ SWITCH_DECLARE(char *) switch_channel_get_name(switch_channel *channel); /*! \brief Hangup a channel flagging it's state machine to end \param channel channel to hangup - \return SWITCH_STATUS_SUCCESS if channel state was set to hangup + \return the resulting channel state. */ -SWITCH_DECLARE(switch_status) switch_channel_hangup(switch_channel *channel); +SWITCH_DECLARE(switch_channel_state) switch_channel_hangup(switch_channel *channel); /*! \brief Test for presence of DTMF on a given channel diff --git a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c index 14c2d9bcf8..266fadad00 100644 --- a/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c +++ b/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c @@ -551,7 +551,8 @@ static switch_status wanpipe_outgoing_channel(switch_core_session *session, swit pri_sr_free(sr); return SWITCH_STATUS_GENERR; } - if ((tech_pvt->socket = sangoma_create_socket_intr(spri->span, channo)) < 0) { + + if ((tech_pvt->socket = sangoma_open_tdmapi_span_chan(spri->span, channo)) < 0) { switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd!\n"); switch_core_session_destroy(new_session); pri_sr_free(sr); @@ -1060,7 +1061,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri memset(tech_pvt, 0, sizeof(*tech_pvt)); channel = switch_core_session_get_channel(session); switch_core_session_set_private(session, tech_pvt); - sprintf(name, "w%dg%d", spri->span, event->ring.channel); + sprintf(name, "s%dc%d", spri->span, event->ring.channel); switch_channel_set_name(channel, name); } else { @@ -1095,7 +1096,7 @@ static int on_ring(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri tech_pvt->callno = event->ring.channel; tech_pvt->span = spri->span; - if ((fd = sangoma_create_socket_intr(spri->span, event->ring.channel)) < 0) { + if ((fd = sangoma_open_tdmapi_span_chan(spri->span, event->ring.channel)) < 0) { switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd!\n"); } //sangoma_tdm_set_hw_period(fd, &tdm_api, 480); @@ -1142,7 +1143,7 @@ static int on_restart(struct sangoma_pri *spri, sangoma_pri_event_t event_type, switch_channel_hangup(channel); } - if ((fd = sangoma_create_socket_intr(spri->span, event->restart.channel)) < 0) { + if ((fd = sangoma_open_tdmapi_span_chan(spri->span, event->restart.channel)) < 0) { switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Can't open fd [%s]!\n", strerror(errno)); } else { close(fd); diff --git a/src/switch_channel.c b/src/switch_channel.c index ea738f4938..3acbdd8104 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -556,7 +556,7 @@ SWITCH_DECLARE(switch_caller_extension *) switch_channel_get_caller_extension(sw } -SWITCH_DECLARE(switch_status) switch_channel_hangup(switch_channel *channel) +SWITCH_DECLARE(switch_channel_state) switch_channel_hangup(switch_channel *channel) { assert(channel != NULL); if (channel->state < CS_HANGUP) { diff --git a/src/switch_ivr.c b/src/switch_ivr.c index 35758f1c50..9885307362 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -877,7 +877,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi other_audio_thread.objs[0] = session; other_audio_thread.objs[1] = peer_session; other_audio_thread.objs[2] = &stream_id; - other_audio_thread.objs[3] = dtmf_callback; + other_audio_thread.objs[3] = (void *) dtmf_callback; other_audio_thread.objs[4] = session_data; other_audio_thread.objs[5] = &this_audio_thread.running; other_audio_thread.running = 5; @@ -885,7 +885,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_multi_threaded_bridge(switch_core_sessi this_audio_thread.objs[0] = peer_session; this_audio_thread.objs[1] = session; this_audio_thread.objs[2] = &stream_id; - this_audio_thread.objs[3] = dtmf_callback; + this_audio_thread.objs[3] = (void *) dtmf_callback; this_audio_thread.objs[4] = peer_session_data; this_audio_thread.objs[5] = &other_audio_thread.running; this_audio_thread.running = 2;