From c8dc575810714a77ff7688cea1346be83d0ba60f Mon Sep 17 00:00:00 2001 From: Brian Somers <brian@FreeBSD.org> Date: Fri, 10 Apr 1998 14:55:11 +0000 Subject: [PATCH] Nuke the device name *after* unlocking it. --- usr.sbin/ppp/modem.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c index ac6dada2308e..64450a4894b9 100644 --- a/usr.sbin/ppp/modem.c +++ b/usr.sbin/ppp/modem.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: modem.c,v 1.77.2.46 1998/04/10 13:19:13 brian Exp $ + * $Id: modem.c,v 1.77.2.47 1998/04/10 13:22:38 brian Exp $ * * TODO: */ @@ -758,11 +758,10 @@ modem_Close(struct physical *modem) if (modem->link.Timer.load) modem_Hangup(modem, force_hack); - *modem->name.full = '\0'; - modem->name.base = modem->name.full; - if (!isatty(modem->fd)) { modem_PhysicalClose(modem); + *modem->name.full = '\0'; + modem->name.base = modem->name.full; return; } @@ -798,6 +797,8 @@ modem_LogicalClose(struct physical *modem) modem_PhysicalClose(modem); modem_Unlock(modem); } + *modem->name.full = '\0'; + modem->name.base = modem->name.full; } static void