mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
Destroy any existing chat timeouts in datalink_ComeDown()
If we're told to close/down while in DIAL or LOGIN state, we don't want to keep our timeout running :-/
This commit is contained in:
parent
7c9bea41de
commit
b6f5f44231
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38414
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: datalink.c,v 1.17 1998/08/07 18:42:48 brian Exp $
|
||||
* $Id: datalink.c,v 1.18 1998/08/09 15:34:11 brian Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -439,6 +439,7 @@ datalink_ComeDown(struct datalink *dl, int how)
|
||||
datalink_NewState(dl, DATALINK_READY);
|
||||
} else if (dl->state != DATALINK_CLOSED && dl->state != DATALINK_HANGUP) {
|
||||
modem_Offline(dl->physical);
|
||||
chat_Destroy(&dl->chat);
|
||||
if (dl->script.run && dl->state != DATALINK_OPENING) {
|
||||
datalink_NewState(dl, DATALINK_HANGUP);
|
||||
chat_Init(&dl->chat, dl->physical, dl->cfg.script.hangup, 1, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user