fix edge case endless loop that can get a channel stuck

This commit is contained in:
Anthony Minessale committed 2012-01-11 12:05:16 -06:00
1 parent cfa926d781
commit 19d49e2075
2 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -1383,7 +1383,7 @@ SWITCH_DECLARE(void) switch_channel_wait_for_state(switch_channel_t *channel, sw
switch_assert(channel);
for (;;) {
if ((channel->state == channel->running_state && channel->running_state == want_state) ||
if ((channel->state < CS_HANGUP && channel->state == channel->running_state && channel->running_state == want_state) ||
(other_channel && switch_channel_down_nosig(other_channel)) || switch_channel_down_nosig(channel)) {
break;
}