delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4816615E.8060608@cwilson.fastmail.fm> |
Date: | Mon, 28 Apr 2008 19:44:30 -0400 |
From: | Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: inetutils 1.5 / ftpd problem: 426 Data connection: No buffer space available. |
References: | <3ee066b40804272035p45746b2bwc5bebd0252d92426 AT mail DOT gmail DOT com> <4815777F DOT 3060005 AT cwilson DOT fastmail DOT fm> <20080428084603 DOT GX23852 AT calimero DOT vinschen DOT de> <48165B28 DOT 4030804 AT cwilson DOT fastmail DOT fm> |
In-Reply-To: | <48165B28.4030804@cwilson.fastmail.fm> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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 |
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 ... do { - cnt = write (netfd, bp, len); +#ifdef __CYGWIN__ + /* on cygwin, socket write is limited to 64k max */ + cnt = write (netfd, bp, (len < LARGE_TRANSFER_LIMIT ? len : LARGE_TRANSFER_LIMIT)); +#else + cnt = write (netfd, bp, len); +#endif len -= cnt; bp += cnt; if (cnt > 0) byte_count += cnt; } while (cnt > 0 && len > 0); antony, please test the following: http://cygwin.cwilson.fastmail.fm/ITP/ftpd.exe.bz2 -- Chuck -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |