handle failure on chan open on new setup msg

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@418 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2008-02-29 17:55:29 +00:00
parent 759e606ed2
commit da7a79ce61
1 changed files with 6 additions and 2 deletions

View File

@ -238,8 +238,12 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen)
}
if (fail) {
zap_log(ZAP_LOG_CRIT, "FIX ME! %s\n", zap_channel_state2str(zchan->state));
// add me
if (zchan) {
zap_log(ZAP_LOG_CRIT, "FIX ME! %s\n", zap_channel_state2str(zchan->state));
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_HANGUP);
} else {
zap_log(ZAP_LOG_CRIT, "Failed to open channel for new setup message\n");
}
}
}