cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4720 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
dc205ae219
commit
9bacb04df9
|
@ -587,8 +587,6 @@ static switch_status_t channel_kill_channel(switch_core_session_t *session, int
|
|||
default:
|
||||
break;
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL KILL\n", switch_channel_get_name(channel));
|
||||
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -649,6 +647,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
|||
private_t *tech_pvt = NULL;
|
||||
switch_time_t started = switch_time_now();
|
||||
unsigned int elapsed;
|
||||
switch_byte_t *data;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
@ -703,8 +702,10 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
|
|||
return SWITCH_STATUS_FALSE;
|
||||
|
||||
cng:
|
||||
tech_pvt->read_frame.datalen = 13;
|
||||
memset(tech_pvt->read_frame.data, 0, 13);
|
||||
data = (switch_byte_t *) tech_pvt->read_frame.data;
|
||||
data[0] = 65;
|
||||
data[1] = 0;
|
||||
tech_pvt->read_frame.datalen = 2;
|
||||
tech_pvt->read_frame.flags = SFF_CNG;
|
||||
*frame = &tech_pvt->read_frame;
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
|
|
@ -1036,10 +1036,10 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_pre_answered(switch_
|
|||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
/* if we're in a bridge and the other channel is in a blocking read they will never realize we have answered so send
|
||||
/* if we're the child of another channel and the other channel is in a blocking read they will never realize we have answered so send
|
||||
a SWITCH_SIG_BREAK to interrupt any blocking reads on that channel
|
||||
*/
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_ORIGINATOR_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
|
||||
switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK);
|
||||
switch_core_session_rwunlock(other_session);
|
||||
}
|
||||
|
@ -1149,10 +1149,10 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan
|
|||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
/* if we're in a bridge and the other channel is in a blocking read they will never realize we have answered so send
|
||||
/* if we're the child of another channel and the other channel is in a blocking read they will never realize we have answered so send
|
||||
a SWITCH_SIG_BREAK to interrupt any blocking reads on that channel
|
||||
*/
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
|
||||
if ((uuid = switch_channel_get_variable(channel, SWITCH_ORIGINATOR_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
|
||||
switch_core_session_kill_channel(other_session, SWITCH_SIG_BREAK);
|
||||
switch_core_session_rwunlock(other_session);
|
||||
}
|
||||
|
|
|
@ -2048,10 +2048,9 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
|
|||
switch_channel_answer(chan_a);
|
||||
ans_a++;
|
||||
} else if (!pre_b && switch_channel_test_flag(chan_b, CF_EARLY_MEDIA)) {
|
||||
if (switch_channel_pre_answer(chan_a) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_pre_answer(chan_a);
|
||||
pre_b++;
|
||||
}
|
||||
}
|
||||
if (!pre_b) {
|
||||
switch_yield(10000);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue