update core

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4181 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2007-02-09 20:03:07 +00:00
1 parent 1eacf043d2
commit f03226debb
11 files changed
+176 -177

No files matched your search

+10 -10
View File
@@ -426,8 +426,8 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session);
static switch_status_t channel_on_ring(switch_core_session_t *session);
static switch_status_t channel_on_loopback(switch_core_session_t *session);
static switch_status_t channel_on_transmit(switch_core_session_t *session);
static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool);
static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
switch_io_flag_t flags, int stream_id);
static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, int timeout,
@@ -802,8 +802,8 @@ static const switch_loadable_module_interface_t channel_module_interface = {
/* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
*/
static switch_status_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool)
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
private_t *tech_pvt;
@@ -819,7 +819,7 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
switch_core_session_destroy(new_session);
return SWITCH_STATUS_GENERR;
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (outbound_profile) {
@@ -834,18 +834,18 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Doh! no caller profile\n");
switch_core_session_destroy(new_session);
return SWITCH_STATUS_GENERR;
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if ((tech_pvt->iax_session = iax_session_new()) == 0) {
switch_core_session_destroy(new_session);
return SWITCH_STATUS_GENERR;
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
if (iax_set_codec(tech_pvt, tech_pvt->iax_session, &req, &cap, &samprate, IAX_QUERY) != SWITCH_STATUS_SUCCESS) {
switch_core_session_destroy(new_session);
return SWITCH_STATUS_GENERR;
return SWITCH_CAUSE_BEARERCAPABILITY_NOTIMPL;
}
if (samprate) {
@@ -859,10 +859,10 @@ static switch_status_t channel_outgoing_channel(switch_core_session_t *session,
switch_channel_set_flag(channel, CF_OUTBOUND);
switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
switch_channel_set_state(channel, CS_INIT);
return SWITCH_STATUS_SUCCESS;
return SWITCH_CAUSE_SUCCESS;
}
return SWITCH_STATUS_GENERR;
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}