提交 b43a995b authored 作者: Anthony Minessale's avatar Anthony Minessale

sync

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@423 a93c3328-9c30-0410-af19-c9cd2b2d52af
上级 f09846d3
...@@ -247,7 +247,7 @@ int ss7bc_connection_write(ss7bc_connection_t *mcon, ss7bc_event_t *event) ...@@ -247,7 +247,7 @@ int ss7bc_connection_write(ss7bc_connection_t *mcon, ss7bc_event_t *event)
{ {
int err; int err;
if (!event) { if (!event || mcon->socket < 0 || !mcon->mutex) {
zap_log(ZAP_LOG_DEBUG, "Critical Error: No Event Device\n"); zap_log(ZAP_LOG_DEBUG, "Critical Error: No Event Device\n");
return -EINVAL; return -EINVAL;
} }
......
...@@ -132,9 +132,12 @@ static ZIO_CHANNEL_REQUEST_FUNCTION(ss7_boost_channel_request) ...@@ -132,9 +132,12 @@ static ZIO_CHANNEL_REQUEST_FUNCTION(ss7_boost_channel_request)
} }
} }
if (OUTBOUND_REQUESTS[r].status == BST_READY) { if (OUTBOUND_REQUESTS[r].status == BST_READY && OUTBOUND_REQUESTS[r].zchan) {
*zchan = OUTBOUND_REQUESTS[r].zchan; *zchan = OUTBOUND_REQUESTS[r].zchan;
status = ZAP_SUCCESS; status = ZAP_SUCCESS;
} else {
status = ZAP_FAIL;
*zchan = NULL;
} }
done: done:
...@@ -162,6 +165,7 @@ static void handle_call_start_ack(ss7bc_connection_t *mcon, ss7bc_event_t *event ...@@ -162,6 +165,7 @@ static void handle_call_start_ack(ss7bc_connection_t *mcon, ss7bc_event_t *event
zap_log(ZAP_LOG_ERROR, "OPEN ERROR [%s]\n", zchan->last_error); zap_log(ZAP_LOG_ERROR, "OPEN ERROR [%s]\n", zchan->last_error);
} else { } else {
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_PROGRESS_MEDIA); zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_PROGRESS_MEDIA);
zap_set_flag(zchan, ZAP_CHANNEL_OUTBOUND);
OUTBOUND_REQUESTS[event->call_setup_id].zchan = zchan; OUTBOUND_REQUESTS[event->call_setup_id].zchan = zchan;
return; return;
} }
...@@ -477,6 +481,7 @@ static __inline__ void state_advance(zap_channel_t *zchan) ...@@ -477,6 +481,7 @@ static __inline__ void state_advance(zap_channel_t *zchan)
{ {
sig.event_id = ZAP_SIGEVENT_STOP; sig.event_id = ZAP_SIGEVENT_STOP;
status = ss7_boost_data->signal_cb(&sig); status = ss7_boost_data->signal_cb(&sig);
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN);
} }
default: default:
break; break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论