fix issue in monitor_early_media_fail issue

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12271 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2009-02-25 03:41:18 +00:00
1 parent 4a520847c2
commit 9556be51ef
17 files changed
+43 -43

No files matched your search

@@ -1091,7 +1091,7 @@ static switch_status_t negotiate_media(switch_core_session_t *session)
now = switch_micro_time_now();
elapsed = (unsigned int) ((now - started) / 1000);
if (switch_channel_get_state(channel) >= CS_HANGUP || switch_test_flag(tech_pvt, TFLAG_BYE)) {
if (switch_channel_down(channel) || switch_test_flag(tech_pvt, TFLAG_BYE)) {
goto out;
}
@@ -1119,7 +1119,7 @@ static switch_status_t negotiate_media(switch_core_session_t *session)
switch_cond_next();
}
if (switch_channel_get_state(channel) >= CS_HANGUP || switch_test_flag(tech_pvt, TFLAG_BYE)) {
if (switch_channel_down(channel) || switch_test_flag(tech_pvt, TFLAG_BYE)) {
goto out;
}
@@ -2542,7 +2542,7 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "using Existing session for %s\n", ldl_session_get_id(dlsession));
if (switch_channel_get_state(channel) >= CS_HANGUP) {
if (switch_channel_down(channel)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Call %s is already over\n", switch_channel_get_name(channel));
status = LDL_STATUS_FALSE;
goto done;
+1 -1
View File
@@ -1081,7 +1081,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_iax_runtime)
break;
case IAX_EVENT_VOICE:
if (tech_pvt && (tech_pvt->read_frame.datalen = iaxevent->datalen) != 0) {
if (channel && switch_channel_get_state(channel) <= CS_HANGUP) {
if (channel && switch_channel_up(channel)) {
int bytes = 0, frames = 1;
if (!switch_test_flag(tech_pvt, TFLAG_CODEC) || !tech_pvt->read_codec.implementation) {
+2 -2
View File
@@ -959,7 +959,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
private_object_t *tech_pvt = switch_core_session_get_private(session);
switch_status_t status = SWITCH_STATUS_SUCCESS;
if (switch_channel_get_state(channel) >= CS_HANGUP || !tech_pvt) {
if (switch_channel_down(channel) || !tech_pvt) {
status = SWITCH_STATUS_FALSE;
goto end;
}
@@ -997,7 +997,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
/* ones that do need to lock sofia mutex */
switch_mutex_lock(tech_pvt->sofia_mutex);
if (switch_channel_get_state(channel) >= CS_HANGUP || !tech_pvt) {
if (switch_channel_down(channel) || !tech_pvt) {
status = SWITCH_STATUS_FALSE;
goto end_lock;
}
+2 -2
View File
@@ -364,7 +364,7 @@ void sofia_event_callback(nua_event_t event,
}
if (session) {
if (channel && switch_channel_get_state(channel) >= CS_HANGUP) {
if (channel && switch_channel_down(channel)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is already hungup.\n");
goto done;
}
@@ -3325,7 +3325,7 @@ void *SWITCH_THREAD_FUNC nightmare_xfer_thread_run(switch_thread_t *thread, void
status = switch_ivr_originate(a_session, &tsession, &cause, nhelper->exten, timeout, NULL, NULL, NULL, NULL, NULL, SOF_NONE);
if ((switch_channel_get_state(channel_a) < CS_HANGUP)) {
if ((switch_channel_up(channel_a))) {
if (status != SWITCH_STATUS_SUCCESS || cause != SWITCH_CAUSE_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel! [%s]\n", nhelper->exten);