delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/14/06:01:19

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Sun, 14 Jun 2009 12:00:51 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [BUG 1.7 getopt_long() and recv()] has problem for tftp-hpa-5.0 on cygwin-1.7/win2003
Message-ID: <20090614100051.GA1183@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <675149 DOT 63397 DOT qm AT web110509 DOT mail DOT gq1 DOT yahoo DOT com> <20090614060028 DOT GA22148 AT ednor DOT casa DOT cgf DOT cx>
MIME-Version: 1.0
In-Reply-To: <20090614060028.GA22148@ednor.casa.cgf.cx>
User-Agent: Mutt/1.5.19 (2009-02-20)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jun 14 02:00, Christopher Faylor wrote:
> On Sat, Jun 13, 2009 at 07:53:10PM -0700, Xiaoqiang Zheng wrote:
> >to make the 2 BUGs more clear:
> >[...]
> >* recv() returns -1 with error 14 when it read acknolege packet from the socket, the normal return value is 4.
> 
> Chuck's analysis of 1. seems spot on.
> 
> Corinna should have fixed 2.  earlier today.  Her fix should be in the
> latest snapshot at http://cygwin.com/snapshots/

Just FYI, I found that the Winsock function WSARecvFrom has a weird
property.  If the parameter in which the socket name is returned is a
NULL pointer, the namelen pointer must be a NULL pointer as well,
otherwise WSARecvFrom returns a WSAEFAULT error, even if the namelen
pointer points to a valid, writable memory area.  The name and namelen
parameter are ignored entirely with TCP sockets, so WSAEFAULT is only
returned for UDP sockets.  This might explain that we didn't have a bug
report for this so far.

Thanks for the testcase, even though an entire application is quite
bulky as a testcase.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019