don't all double unpark of same channel
This commit is contained in:
parent
ecbd1db8f6
commit
f847059442
|
@ -450,6 +450,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
|
||||||
if (!token) {
|
if (!token) {
|
||||||
switch_mutex_lock(lot->mutex);
|
switch_mutex_lock(lot->mutex);
|
||||||
token = (valet_token_t *) switch_core_hash_find(lot->hash, ext);
|
token = (valet_token_t *) switch_core_hash_find(lot->hash, ext);
|
||||||
|
if (token->bridged) {
|
||||||
|
token = NULL;
|
||||||
|
}
|
||||||
switch_mutex_unlock(lot->mutex);
|
switch_mutex_unlock(lot->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,8 +486,9 @@ SWITCH_STANDARD_APP(valet_parking_function)
|
||||||
switch_core_session_rwunlock(b_session);
|
switch_core_session_rwunlock(b_session);
|
||||||
token->timeout = 0;
|
token->timeout = 0;
|
||||||
token->bridged = 1;
|
token->bridged = 1;
|
||||||
|
|
||||||
switch_ivr_uuid_bridge(switch_core_session_get_uuid(session), token->uuid);
|
switch_ivr_uuid_bridge(switch_core_session_get_uuid(session), token->uuid);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue