mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7103 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -550,14 +550,24 @@ SWITCH_DECLARE(void) switch_channel_wait_for_state(switch_channel_t *channel, sw
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_wait_for_flag(switch_channel_t *channel, switch_channel_flag_t want_flag, uint32_t to)
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_wait_for_flag(switch_channel_t *channel, switch_channel_flag_t want_flag, switch_bool_t pres, uint32_t to)
|
||||
{
|
||||
|
||||
if (to) {
|
||||
to++;
|
||||
}
|
||||
|
||||
while(!switch_test_flag(channel, want_flag)) {
|
||||
for(;;) {
|
||||
if (pres) {
|
||||
if (switch_test_flag(channel, want_flag)) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!switch_test_flag(channel, want_flag)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch_yield(1000);
|
||||
if (to && !--to) {
|
||||
return SWITCH_STATUS_TIMEOUT;
|
||||
|
Reference in New Issue
Block a user