Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/usr.bin/ftp Pull up revision 1.65 (requested by lukem in ...



details:   https://anonhg.NetBSD.org/src/rev/064343fdf093
branches:  netbsd-3
changeset: 575744:064343fdf093
user:      tron <tron%NetBSD.org@localhost>
date:      Mon May 09 17:01:43 2005 +0000

description:
Pull up revision 1.65 (requested by lukem in ticket #265):
Implement a timeout on the accept(2) in dataconn() and the
connect(2) in xconnect() by temporarily setting O_NONBLOCK
on the socket and using xpoll() to wait for the operation
to succeed.
The timeout used is the '-q quittime' argument (defaults to
60s for accept(2), and the system default for connect(2)).
Idea inspired by discussion with Chuck Cranor.
This may (indirectly) fix various problems with timeouts
in active mode through broken firewalls.
Implement xpoll() as a wrapper around poll(2), to make it
easier to replace on systems without a functional poll(2).
Unconditionally use xpoll() instead of conditionally using
select(2) or poll(2).

diffstat:

 usr.bin/ftp/extern.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 6df7cb9dfb04 -r 064343fdf093 usr.bin/ftp/extern.h
--- a/usr.bin/ftp/extern.h      Mon May 09 17:01:35 2005 +0000
+++ b/usr.bin/ftp/extern.h      Mon May 09 17:01:43 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.64 2005/02/09 23:17:27 christos Exp $     */
+/*     $NetBSD: extern.h,v 1.64.2.1 2005/05/09 17:01:43 tron Exp $     */
 
 /*-
  * Copyright (c) 1996-2005 The NetBSD Foundation, Inc.
@@ -250,6 +250,7 @@
 void   user(int, char **);
 int    xconnect(int, const struct sockaddr *, int);
 int    xlisten(int, int);
+int    xpoll(struct pollfd *, int, int);
 void   *xmalloc(size_t);
 StringList *xsl_init(void);
 void   xsl_add(StringList *, char *);



Home | Main Index | Thread Index | Old Index