don't all double unpark of same channel

This commit is contained in:
Anthony Minessale 2011-10-28 15:58:17 -05:00
parent ecbd1db8f6
commit f847059442
1 changed files with 5 additions and 1 deletions

View File

@ -450,6 +450,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
if (!token) {
switch_mutex_lock(lot->mutex);
token = (valet_token_t *) switch_core_hash_find(lot->hash, ext);
if (token->bridged) {
token = NULL;
}
switch_mutex_unlock(lot->mutex);
}
@ -483,8 +486,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
switch_core_session_rwunlock(b_session);
token->timeout = 0;
token->bridged = 1;
switch_ivr_uuid_bridge(switch_core_session_get_uuid(session), token->uuid);
return;
}
}