mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
update
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@426 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -979,16 +979,17 @@ zap_status_t zap_channel_close(zap_channel_t **zchan)
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
|
||||
zap_mutex_lock(check->mutex);
|
||||
if (zap_test_flag(check, ZAP_CHANNEL_OPEN)) {
|
||||
status = check->zio->close(check);
|
||||
if (status == ZAP_SUCCESS) {
|
||||
zap_channel_reset(check);
|
||||
*zchan = NULL;
|
||||
if (zap_test_flag(check, ZAP_CHANNEL_CONFIGURED)) {
|
||||
zap_mutex_lock(check->mutex);
|
||||
if (zap_test_flag(check, ZAP_CHANNEL_OPEN)) {
|
||||
status = check->zio->close(check);
|
||||
if (status == ZAP_SUCCESS) {
|
||||
zap_channel_reset(check);
|
||||
*zchan = NULL;
|
||||
}
|
||||
}
|
||||
zap_mutex_unlock(check->mutex);
|
||||
}
|
||||
|
||||
zap_mutex_unlock(check->mutex);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user