From owner-cvs-all@FreeBSD.ORG Thu Aug 3 15:31:54 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37BB716A4DE; Thu, 3 Aug 2006 15:31:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 088C743D6E; Thu, 3 Aug 2006 15:31:53 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k73FVqMa039070; Thu, 3 Aug 2006 15:31:52 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k73FVqGl039069; Thu, 3 Aug 2006 15:31:52 GMT (envelope-from jhb) Message-Id: <200608031531.k73FVqGl039069@repoman.freebsd.org> From: John Baldwin Date: Thu, 3 Aug 2006 15:31:52 +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/netsmb smb_trantcp.c src/sys/netncp ncp_sock.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 15:31:54 -0000 jhb 2006-08-03 15:31:52 UTC FreeBSD src repository Modified files: sys/netsmb smb_trantcp.c sys/netncp ncp_sock.c Log: - Fix ncp_poll() to not panic if the socket doesn't have any pending data. We have to adjust curthread's state enough so that it appears to be in a poll(2) or select(2) call so that selrecord() will work and then teardown that state after calling sopoll(). - Fix some minor nits in nearby ncp_sock_rselect() and in the identical nbssn_rselect() function in the netsmb code: - Don't call nb_poll()/ncp_poll() now that ncp_poll() already fakes up poll(2) state since the rselect() functions already do that. Just invoke sopoll() directly. - To make things slightly more intuitive, store the results of sopoll() in a new 'revents' variable rather than 'error' since that's what sopoll() actually returns. - If the requested timeout time has been exceeded by the time we get ready to block, then return EWOULDBLOCK rather than 0 to signal a timeout as this is what the calling code expects. Tested by: Eric Christeson (1) MFC after: 1 week Revision Changes Path 1.17 +27 -7 src/sys/netncp/ncp_sock.c 1.24 +6 -10 src/sys/netsmb/smb_trantcp.c