fifo tweaks

This commit is contained in:
Anthony Minessale committed 2010-07-15 20:36:54 -05:00
1 parent ade0dcd7cb
commit 1381d02a58
2 files changed
+108 -95

No files matched your search

+6 -5
View File
@@ -1072,18 +1072,19 @@ SWITCH_DECLARE(switch_bool_t) switch_channel_clear_flag_partner(switch_channel_t
SWITCH_DECLARE(void) switch_channel_wait_for_state(switch_channel_t *channel, switch_channel_t *other_channel, switch_channel_state_t want_state)
{
switch_channel_state_t state, mystate, ostate;
ostate = switch_channel_get_state(channel);
switch_channel_state_t state, mystate;
for (;;) {
state = switch_channel_get_running_state(other_channel);
if (other_channel) {
state = switch_channel_get_running_state(other_channel);
}
mystate = switch_channel_get_running_state(channel);
if ((channel->state == channel->running_state && channel->running_state == want_state) ||
other_channel->state >= CS_HANGUP || channel->state >= CS_HANGUP) {
(other_channel && other_channel->state >= CS_HANGUP) || channel->state >= CS_HANGUP) {
break;
}
switch_cond_next();
switch_yield(20000);
}
}