mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
update
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@298 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -577,12 +577,11 @@ zap_status_t zap_channel_set_state(zap_channel_t *zchan, zap_channel_state_t sta
|
||||
{
|
||||
int ok = 1;
|
||||
|
||||
zap_mutex_lock(zchan->mutex);
|
||||
|
||||
if (!zap_test_flag(zchan, ZAP_CHANNEL_READY)) {
|
||||
return ZAP_FAIL;
|
||||
}
|
||||
|
||||
zap_mutex_lock(zchan->mutex);
|
||||
switch(zchan->state) {
|
||||
case ZAP_CHANNEL_STATE_HANGUP:
|
||||
case ZAP_CHANNEL_STATE_TERMINATING:
|
||||
@@ -641,7 +640,7 @@ zap_status_t zap_channel_set_state(zap_channel_t *zchan, zap_channel_state_t sta
|
||||
if (state == zchan->state) {
|
||||
ok = 0;
|
||||
}
|
||||
|
||||
|
||||
if (ok) {
|
||||
zap_set_flag(zchan, ZAP_CHANNEL_STATE_CHANGE);
|
||||
zap_set_flag(zchan->span, ZAP_SPAN_STATE_CHANGE);
|
||||
@@ -1209,11 +1208,13 @@ zap_status_t zap_channel_command(zap_channel_t *zchan, zap_command_t command, vo
|
||||
|
||||
if (!zchan->zio->command) {
|
||||
snprintf(zchan->last_error, sizeof(zchan->last_error), "method not implemented");
|
||||
zap_log(ZAP_LOG_ERROR, "no commnand functon!\n");
|
||||
GOTO_STATUS(done, ZAP_FAIL);
|
||||
}
|
||||
|
||||
status = zchan->zio->command(zchan, command, obj);
|
||||
|
||||
|
||||
done:
|
||||
zap_mutex_unlock(zchan->mutex);
|
||||
return status;
|
||||
|
Reference in New Issue
Block a user