From owner-cvs-src@FreeBSD.ORG Sat Apr 1 16:04:42 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A54D716A400; Sat, 1 Apr 2006 16:04:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73C5143D45; Sat, 1 Apr 2006 16:04:42 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k31G4gEn027876; Sat, 1 Apr 2006 16:04:42 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k31G4gHx027875; Sat, 1 Apr 2006 16:04:42 GMT (envelope-from rwatson) Message-Id: <200604011604.k31G4gHx027875@repoman.freebsd.org> From: Robert Watson Date: Sat, 1 Apr 2006 16:04:42 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/netinet in_pcb.c in_pcb.h src/sys/netinet6 in6_pcb.c in6_pcb.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2006 16:04:42 -0000 rwatson 2006-04-01 16:04:42 UTC FreeBSD src repository Modified files: sys/netinet in_pcb.c in_pcb.h sys/netinet6 in6_pcb.c in6_pcb.h Log: Break out in_pcbdetach() into two functions: - in_pcbdetach(), which removes the link between an inpcb and its socket. - in_pcbfree(), which frees a detached pcb. Unlike the previous in_pcbdetach(), neither of these functions will attempt to conditionally free the socket, as they are responsible only for managing in_pcb memory. Mirror these changes into in6_pcbdetach() by breaking it into in6_pcbdetach() and in6_pcbfree(). While here, eliminate undesired checks for NULL inpcb pointers in sockets, as we will now have as an invariant that sockets will always have valid so_pcb pointers. MFC after: 3 months Revision Changes Path 1.170 +21 -18 src/sys/netinet/in_pcb.c 1.86 +1 -0 src/sys/netinet/in_pcb.h 1.66 +11 -13 src/sys/netinet6/in6_pcb.c 1.17 +1 -0 src/sys/netinet6/in6_pcb.h