From 697f33c12b0a8b84baf5fae830418433e6307ffb Mon Sep 17 00:00:00 2001 From: Hellmuth Michaelis Date: Sat, 21 Jul 2001 16:31:39 +0000 Subject: [PATCH] Another hangup bugfix from Juha: Problem 1 is that the config entry hangup flag is zeroed only at CONNECT_ACTIVE_IND in msghdl.c. If any (other) call is disconnected after EV_MDO and before CONNECT_ACTIVE_IND, the cleanup routine will disconnect the in-progress dialout as well, if its hangup flag is nonzero (which it is likely to be) after the previous incarnation of the cfg entry. Patch-1 fixes this by clearing the hangup flag as soon as a cfg entry is reserved for the call. Submitted by: Juha-Matti Liukkonen --- usr.sbin/i4b/isdnd/msghdl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/i4b/isdnd/msghdl.c b/usr.sbin/i4b/isdnd/msghdl.c index a671954df2cb..fa2354ada03f 100644 --- a/usr.sbin/i4b/isdnd/msghdl.c +++ b/usr.sbin/i4b/isdnd/msghdl.c @@ -143,6 +143,7 @@ msg_connect_ind(msg_connect_ind_t *mp) log(LL_CHD, "%05d %s ignoring: incoming call from %s to %s", mp->header.cdid, cep->name, SRC, DST); sendm_connect_resp(NULL, mp->header.cdid, SETUP_RESP_DNTCRE, 0); + cep->cdid = CDID_UNUSED; break; case REACT_ANSWER: @@ -764,6 +765,7 @@ msg_disconnect_ind(msg_disconnect_ind_t *mp) incr_free_channels(cep->isdncontrollerused); cep->connect_time = 0; + cep->cdid = CDID_UNUSED; next_state(cep, EV_MDI); } @@ -816,6 +818,7 @@ msg_dialout(msg_dialout_ind_t *mp) cep->charge = 0; cep->last_charge = 0; + cep->hangup = 0; next_state(cep, EV_MDO); } @@ -868,6 +871,7 @@ msg_dialoutnumber(msg_dialoutnumber_ind_t *mp) cep->charge = 0; cep->last_charge = 0; + cep->hangup = 0; next_state(cep, EV_MDO); }