ncp_subr.c (52152) | ncp_subr.c (66615) |
---|---|
1/* 2 * Copyright (c) 1999, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1999, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/netncp/ncp_subr.c 52152 1999-10-12 10:37:00Z bp $ | 32 * $FreeBSD: head/sys/netncp/ncp_subr.c 66615 2000-10-04 01:29:17Z jasone $ |
33 */ 34#include <sys/param.h> 35#include <sys/errno.h> 36#include <sys/proc.h> 37#include <sys/systm.h> 38#include <sys/kernel.h> 39#include <sys/malloc.h> 40#include <sys/time.h> --- 78 unchanged lines hidden (view full) --- 119 if (ncp_conn_lock(ncp, p, p->p_ucred,NCPM_READ|NCPM_EXECUTE|NCPM_WRITE)) { 120 NCPFATAL("Can't lock connection !\n"); 121 continue; 122 } 123 if (ncp_disconnect(ncp) != 0) 124 ncp_conn_unlock(ncp,p); 125 } 126 ncp_conn_unlocklist(p); | 33 */ 34#include <sys/param.h> 35#include <sys/errno.h> 36#include <sys/proc.h> 37#include <sys/systm.h> 38#include <sys/kernel.h> 39#include <sys/malloc.h> 40#include <sys/time.h> --- 78 unchanged lines hidden (view full) --- 119 if (ncp_conn_lock(ncp, p, p->p_ucred,NCPM_READ|NCPM_EXECUTE|NCPM_WRITE)) { 120 NCPFATAL("Can't lock connection !\n"); 121 continue; 122 } 123 if (ncp_disconnect(ncp) != 0) 124 ncp_conn_unlock(ncp,p); 125 } 126 ncp_conn_unlocklist(p); |
127 ncp_conn_destroy(); |
|
127} 128 129 130/* tick every second and check for watch dog packets and lost connections */ 131static void 132ncp_timer(void *arg){ 133 struct ncp_conn *conn; 134 --- 120 unchanged lines hidden --- | 128} 129 130 131/* tick every second and check for watch dog packets and lost connections */ 132static void 133ncp_timer(void *arg){ 134 struct ncp_conn *conn; 135 --- 120 unchanged lines hidden --- |