From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6Www-00044n-KG for qemu-devel@nongnu.org; Wed, 11 Jun 2008 16:29:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6Wwu-00044b-8t for qemu-devel@nongnu.org; Wed, 11 Jun 2008 16:29:41 -0400 Received: from [199.232.76.173] (port=55146 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6Wwu-00044W-23 for qemu-devel@nongnu.org; Wed, 11 Jun 2008 16:29:40 -0400 Received: from miranda.se.axis.com ([193.13.178.8]:42044) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K6Wwu-00013p-3l for qemu-devel@nongnu.org; Wed, 11 Jun 2008 16:29:40 -0400 Received: from axis.com (edgar.se.axis.com [10.93.151.1]) by miranda.se.axis.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id m5BKTb6x013760 for ; Wed, 11 Jun 2008 22:29:37 +0200 Date: Wed, 11 Jun 2008 22:29:37 +0200 From: "Edgar E. Iglesias" Subject: Re: [Qemu-devel] [PATCH] Proposed fix broken RST response to a slirp redirect socket Message-ID: <20080611202937.GC20729@edgar.se.axis.com> References: <485009A9.6000900@windriver.com> <20080611180739.GA20729@edgar.se.axis.com> <20080611193712.GB20729@edgar.se.axis.com> <4850313B.8030304@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4850313B.8030304@windriver.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wessel Cc: qemu-devel@nongnu.org, "Edgar E. Iglesias" On Wed, Jun 11, 2008 at 03:10:35PM -0500, Jason Wessel wrote: > + int err; > + socklen_t slen; > + > + err = errno; > > --- > > Probably don't need to set err to errno since you are collecting it with getsockopt Please note that the errno value is used when nn < 0. > > --- > > + if (nn == 0) > + getsockopt(so->s, SOL_SOCKET, SO_ERROR, > + &err, &slen); > > --- > > In theory you are supposed to set slen = sizeof(err); prior to calling getsockopt() Thanks, I'll fix that up. Best regards -- Edgar E. Iglesias Axis Communications AB