summaryrefslogtreecommitdiffstats
path: root/sys/netncp/ncp_conn.c
diff options
context:
space:
mode:
authorbp <bp@FreeBSD.org>2001-03-22 10:29:39 +0000
committerbp <bp@FreeBSD.org>2001-03-22 10:29:39 +0000
commit8da937dc1c3df023b9362ec91fdefe30b23c882b (patch)
tree6eb00c3b5192951cef1facc124a1df7ff32f3e57 /sys/netncp/ncp_conn.c
parent127f379b36cf436c09e33b5ba54da70411056dcb (diff)
downloadFreeBSD-src-8da937dc1c3df023b9362ec91fdefe30b23c882b.zip
FreeBSD-src-8da937dc1c3df023b9362ec91fdefe30b23c882b.tar.gz
Properly set flags on the broken connection.
Diffstat (limited to 'sys/netncp/ncp_conn.c')
-rw-r--r--sys/netncp/ncp_conn.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/netncp/ncp_conn.c b/sys/netncp/ncp_conn.c
index 51151d2..c40552b 100644
--- a/sys/netncp/ncp_conn.c
+++ b/sys/netncp/ncp_conn.c
@@ -195,6 +195,18 @@ ncp_conn_assert_locked(struct ncp_conn *conn,char *checker, struct proc *p){
return EIO;
}
+void
+ncp_conn_invalidate(struct ncp_conn *ncp)
+{
+ ncp->flags &= ~(NCPFL_ATTACHED | NCPFL_LOGGED | NCPFL_INVALID);
+}
+
+int
+ncp_conn_invalid(struct ncp_conn *ncp)
+{
+ return ncp->flags & NCPFL_INVALID;
+}
+
/*
* create, fill with defaults and return in locked state
*/
@@ -275,7 +287,7 @@ ncp_conn_free(struct ncp_conn *ncp)
if (ncp_conn_access(ncp, ncp->ucred, NCPM_WRITE))
return EACCES;
- if ((ncp->flags & (NCPFL_INVALID | NCPFL_ATTACHED)) == NCPFL_ATTACHED)
+ if (ncp->flags & NCPFL_ATTACHED)
ncp_ncp_disconnect(ncp);
ncp_sock_disconnect(ncp);
OpenPOWER on IntegriCloud