From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 2 20:43:11 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ABD01065716 for ; Tue, 2 Aug 2011 20:43:11 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by mx1.freebsd.org (Postfix) with ESMTP id 14F658FC16 for ; Tue, 2 Aug 2011 20:43:10 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail13.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p72Kh6mf022129 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Aug 2011 06:43:08 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id p72Kh6bT078883; Wed, 3 Aug 2011 06:43:06 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id p72Kh5t1078882; Wed, 3 Aug 2011 06:43:05 +1000 (EST) (envelope-from peter) Date: Wed, 3 Aug 2011 06:43:05 +1000 From: Peter Jeremy To: "Christoph P.U. Kukulies" Message-ID: <20110802204304.GA78870@server.vk2pj.dyndns.org> References: <4E356498.40001@kukulies.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5vNYLRcllDrimb99" Content-Disposition: inline In-Reply-To: <4E356498.40001@kukulies.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org Subject: Re: invalid argument in select() when peer socket is in FD_SET X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2011 20:43:11 -0000 --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-Jul-31 16:20:08 +0200, "Christoph P.U. Kukulies" wrote: > if (array_of_fds[i]) { > nfds =3D max(nfds, array_of_fds[i]) + 1; I suspect you mean: nfds =3D max(nfds, array_of_fds[i] + 1); > FD_SET(array_of_fds[i], &readfds); > } --=20 Peter Jeremy --5vNYLRcllDrimb99 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk44YVgACgkQ/opHv/APuIeSSQCfaFbMJ00cnPB0zfRigo1pF9Sv aJMAn0F+4zy5BeQ+v0Umji1iCz0B/ony =HJUz -----END PGP SIGNATURE----- --5vNYLRcllDrimb99--