mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 05:18:31 +00:00
wait for cdr to be generated in failed cdr_x
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13253 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
f8537537a5
commit
4619f83a40
3 files changed
+22
-2
No files matched your search
@@ -771,6 +771,25 @@ SWITCH_DECLARE(void) switch_channel_wait_for_state(switch_channel_t *channel, sw
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_wait_for_state_timeout(switch_channel_t *other_channel, switch_channel_state_t want_state, uint32_t timeout)
|
||||
{
|
||||
switch_channel_state_t state;
|
||||
uint32_t count = 0;
|
||||
|
||||
for (;;) {
|
||||
state = switch_channel_get_running_state(other_channel);
|
||||
|
||||
if (state >= want_state) {
|
||||
break;
|
||||
}
|
||||
switch_cond_next();
|
||||
if (++count >= timeout) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_wait_for_flag(switch_channel_t *channel,
|
||||
switch_channel_flag_t want_flag,
|
||||
switch_bool_t pres,
|
||||
|
||||
Reference in new issue
Block a user