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.70 (requested by lukem in ...



details:   https://anonhg.NetBSD.org/src/rev/c47170988233
branches:  netbsd-3
changeset: 575747:c47170988233
user:      tron <tron%NetBSD.org@localhost>
date:      Mon May 09 17:02:03 2005 +0000

description:
Pull up revision 1.70 (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/ftp_var.h |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 50c215e9d04c -r c47170988233 usr.bin/ftp/ftp_var.h
--- a/usr.bin/ftp/ftp_var.h     Mon May 09 17:01:58 2005 +0000
+++ b/usr.bin/ftp/ftp_var.h     Mon May 09 17:02:03 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftp_var.h,v 1.69 2005/01/03 09:50:09 lukem Exp $       */
+/*     $NetBSD: ftp_var.h,v 1.69.2.1 2005/05/09 17:02:03 tron Exp $    */
 
 /*-
  * Copyright (c) 1996-2005 The NetBSD Foundation, Inc.
@@ -112,6 +112,8 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
+#include <poll.h>
+
 #include <setjmp.h>
 #include <stringlist.h>
 



Home | Main Index | Thread Index | Old Index