diff options
author | brian <brian@FreeBSD.org> | 1997-11-18 00:19:34 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-11-18 00:19:34 +0000 |
commit | cb499269d89363f5b47627aad82a37b8f36ac63a (patch) | |
tree | 8d11e83ce6bce73dbb26bf984481b05216d51362 /usr.sbin/ppp/defs.c | |
parent | d692b6bcbf874acd8affe479218c0899ede298db (diff) | |
download | FreeBSD-src-cb499269d89363f5b47627aad82a37b8f36ac63a.zip FreeBSD-src-cb499269d89363f5b47627aad82a37b8f36ac63a.tar.gz |
Add and use a DropClient() function for closing the diagnostic port.
Call DropClient() from Cleanup() too.
Diffstat (limited to 'usr.sbin/ppp/defs.c')
-rw-r--r-- | usr.sbin/ppp/defs.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c index fed64e9..6d2f3ed 100644 --- a/usr.sbin/ppp/defs.c +++ b/usr.sbin/ppp/defs.c @@ -1,5 +1,5 @@ /* - * $Id: defs.c,v 1.2 1997/11/11 22:58:10 brian Exp $ + * $Id: defs.c,v 1.3 1997/11/17 00:42:38 brian Exp $ */ #include <sys/param.h> @@ -69,3 +69,19 @@ GetShortHost() return 1; } + +void +DropClient() +{ + FILE *oVarTerm; + + if (VarTerm && !(mode & MODE_INTER)) { + oVarTerm = VarTerm; + VarTerm = 0; + if (oVarTerm) + fclose(oVarTerm); + close(netfd); + netfd = -1; + LogPrintf(LogPHASE, "Client connection closed.\n"); + } +} |