mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-01 02:52:32 +00:00
add error check condition for invalid channel selection
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@787 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
0f215da2b1
commit
f3370d2cb8
@ -1122,7 +1122,11 @@ OZ_DECLARE(zap_status_t) zap_channel_open(uint32_t span_id, uint32_t chan_id, za
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
check = span->channels[chan_id];
|
if (!(check = span->channels[chan_id])) {
|
||||||
|
zap_log(ZAP_LOG_ERROR, "Invalid Channel %d\n", chan_id);
|
||||||
|
*zchan = NULL;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
if (zap_test_flag(check, ZAP_CHANNEL_SUSPENDED) ||
|
if (zap_test_flag(check, ZAP_CHANNEL_SUSPENDED) ||
|
||||||
!zap_test_flag(check, ZAP_CHANNEL_READY) || (status = zap_mutex_trylock(check->mutex)) != ZAP_SUCCESS) {
|
!zap_test_flag(check, ZAP_CHANNEL_READY) || (status = zap_mutex_trylock(check->mutex)) != ZAP_SUCCESS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user