git-svn-id: http://svn.openzap.org/svn/openzap/trunk@294 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Anthony Minessale 2007-06-26 01:02:36 +00:00
parent f90f684bc0
commit 49b5b251ba
1 changed files with 28 additions and 19 deletions

View File

@ -88,29 +88,38 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen)
if (zchan) {
switch (changestatus->NewStatus) {
case 0: /* change status to "in service" */
zap_clear_flag_locked(zchan, ZAP_CHANNEL_SUSPENDED);
zap_log(ZAP_LOG_DEBUG, "Channel %d:%d in service\n", zchan->span_id, zchan->chan_id);
switch(zchan->state) {
case ZAP_CHANNEL_STATE_UP:
case ZAP_CHANNEL_STATE_IDLE:
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_TERMINATING);
break;
case ZAP_CHANNEL_STATE_DOWN:
break;
default:
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN);
break;
{
zap_clear_flag_locked(zchan, ZAP_CHANNEL_SUSPENDED);
zap_log(ZAP_LOG_DEBUG, "Channel %d:%d in service\n", zchan->span_id, zchan->chan_id);
switch(zchan->state) {
case ZAP_CHANNEL_STATE_UP:
case ZAP_CHANNEL_STATE_IDLE:
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_TERMINATING);
break;
case ZAP_CHANNEL_STATE_DOWN:
break;
default:
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_DOWN);
break;
}
}
case 1: /* change status to "maintenance" */
zap_set_flag_locked(zchan, ZAP_CHANNEL_SUSPENDED);
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_SUSPENDED);
break;
case 2: /* change status to "out of service" */
zap_set_flag_locked(zchan, ZAP_CHANNEL_SUSPENDED);
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_SUSPENDED);
case 1:
{ /* change status to "maintenance" */
zap_set_flag_locked(zchan, ZAP_CHANNEL_SUSPENDED);
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_SUSPENDED);
}
break;
case 2:
{ /* change status to "out of service" */
zap_set_flag_locked(zchan, ZAP_CHANNEL_SUSPENDED);
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_SUSPENDED);
}
break;
default: /* unknown */
break;
{
break;
}
}
}
}