git-svn-id: http://svn.openzap.org/svn/openzap/trunk@423 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale 2008-03-18 20:19:59 +00:00
parent ae4020acac
commit 1540877894
2 changed files with 7 additions and 2 deletions

View File

@ -247,7 +247,7 @@ int ss7bc_connection_write(ss7bc_connection_t *mcon, ss7bc_event_t *event)
{
int err;
if (!event) {
if (!event || mcon->socket < 0 || !mcon->mutex) {
zap_log(ZAP_LOG_DEBUG, "Critical Error: No Event Device\n");
return -EINVAL;
}

View File

@ -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;
status = ZAP_SUCCESS;
} else {
status = ZAP_FAIL;
*zchan = NULL;
}
done:
@ -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);
} else {
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;
return;
}
@ -477,6 +481,7 @@ static __inline__ void state_advance(zap_channel_t *zchan)
{
sig.event_id = ZAP_SIGEVENT_STOP;
status = ss7_boost_data->signal_cb(&sig);
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN);
}
default:
break;