This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: inetutils 1.5 / ftpd problem: 426 Data connection: No buffer space available.

On Apr 28 19:44, Charles Wilson wrote:
> Charles Wilson wrote:
>> Yeah, I'll code that up for 1.5-4.  Should I stick with BUFSIZ == 1024, or 
>> when MMAP use something a little bigger, say 32k?
> Also, uploads to the server seem to be sane (e.g. read() from the server 
> side). So it's just downloads to the client when HAVE_MMAP.  The fix was 
> pretty easy:
>  #ifdef HAVE_MMAP
>  #include <sys/mman.h>
> +# ifdef __CYGWIN__
> +   /* On cygwin, network transfers are limited to an absolute
> +      maximum of 64k, or transfer fails with ENOBUFS. Conservative: */
> +#  define LARGE_TRANSFER_LIMIT 32768
> +# endif
>  #endif

In theory that looks fine, I just don't like the comment.  This is not
Cygwin's fault in the first place and it's not Cygwin returning ENOBUFS
when you use too big send calls in the first place.  Also, Cygwin does
not return ENOBUFS for writes > 64K.  The 1.5 versions lets you do
what you want and you have to deal with Winsock's behaviour directly.

The 1.7 version just sends a maximum of 64K regardless of the incoming
buffer size.  It doesn't refuse the write completely.  Eventually we
should do our own write buffer management in Cygwin so you won't have
to care.  Brian Ford is looking into it, afaik.


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

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]