From 03096f2d75cbecb838599db173b8b6edb93a08f7 Mon Sep 17 00:00:00 2001 From: Hellmuth Michaelis Date: Sat, 21 Jul 2001 16:28:28 +0000 Subject: [PATCH] Fix hangup bug; Juha writes: Problem 2 is that doing a local hangup (eg. by writing "H" to the dialout device) to a call which is already disconnected results in isdnd moving the cfg entry to an illegal state, from which there is no recovery. This is tricky because there is no way to synchronize local hangup with the remote end (ie. the callee can always hang up at an inconvenient time)! Hence, patch-2 alters fsm.c's EV_DRQ state table such that the local hangup request is processed or ignored in most states, even for disconnected calls. Submitted by: Juha-Matti Liukkonen --- usr.sbin/i4b/isdnd/fsm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/usr.sbin/i4b/isdnd/fsm.c b/usr.sbin/i4b/isdnd/fsm.c index 0dcf3459769e..fc1d2f465b7c 100644 --- a/usr.sbin/i4b/isdnd/fsm.c +++ b/usr.sbin/i4b/isdnd/fsm.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1999 Hellmuth Michaelis. All rights reserved. + * Copyright (c) 1997, 2001 Hellmuth Michaelis. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,11 +27,9 @@ * FSM for isdnd * ------------- * - * $Id: fsm.c,v 1.19 2000/08/20 08:08:51 hm Exp $ - * * $FreeBSD$ * - * last edit-date: [Mon Dec 13 21:46:07 1999] + * last edit-date: [Sat Jul 21 18:25:48 2001] * *---------------------------------------------------------------------------*/ @@ -368,7 +366,7 @@ struct state_tab { /* local requests */ /* EV_TIMO */{{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_TIMO,ST_IDLE}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}}, -/* EV_DRQ */{{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_DRQ, ST_WAITDISCI}, {F_NcNa,ST_WAITDISCI}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}}, +/* EV_DRQ */{{F_NcNa, ST_IDLE}, {F_DRQ, ST_WAITDISCI}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_DRQ, ST_WAITDISCI}, {F_NcNa,ST_WAITDISCI}, {F_NcNa, ST_DOWN}, {F_ill, ST_ILL}, {F_ill, ST_ILL}}, /* EV_CBRQ */{{F_NcNa,ST_ACB_WAITDIAL},{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_NcNa,ST_ACB_WAITDIAL},{F_NcNa, ST_ACB_DIAL}, {F_NcNa,ST_ACB_DIALFAIL},{F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}}, /* EV_ALRT */{{F_ALRT,ST_ALERT}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}, {F_ill, ST_ILL}},