aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/lukemftp/src/ftp.c
diff options
context:
space:
mode:
authorMike Heffner <mikeh@FreeBSD.org>2005-02-20 17:33:34 +0000
committerMike Heffner <mikeh@FreeBSD.org>2005-02-20 17:33:34 +0000
commit90580277219d71354d55ed572fca05ccbec50a31 (patch)
treeb3e525aeb6db7ad0b9e566173c63af30b14693ce /contrib/lukemftp/src/ftp.c
parent7e475d60f53f104292ac3b1c0015eeb52678c424 (diff)
downloadsrc-90580277219d71354d55ed572fca05ccbec50a31.tar.gz
src-90580277219d71354d55ed572fca05ccbec50a31.zip
Import the latest CVS version of lukemftp.
Short list of changes: * SIGINT termination from auto-fetch. * Less trusting of remote filenames during auto mgets. * Improved RFC2616 compliancy. * Fix globs when using ftp reget (from mat@). * Limit send buffer size.
Notes
Notes: svn path=/vendor/lukemftp/dist/; revision=142129
Diffstat (limited to 'contrib/lukemftp/src/ftp.c')
-rw-r--r--contrib/lukemftp/src/ftp.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/lukemftp/src/ftp.c b/contrib/lukemftp/src/ftp.c
index 0c3b3d4c85f8..72a4262c1739 100644
--- a/contrib/lukemftp/src/ftp.c
+++ b/contrib/lukemftp/src/ftp.c
@@ -1,7 +1,7 @@
-/* $NetBSD: ftp.c,v 1.125 2004/04/10 12:21:39 lukem Exp $ */
+/* $NetBSD: ftp.c,v 1.126 2004/07/20 10:40:22 lukem Exp $ */
/*-
- * Copyright (c) 1996-2002 The NetBSD Foundation, Inc.
+ * Copyright (c) 1996-2004 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -99,7 +99,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-__RCSID("$NetBSD: ftp.c,v 1.125 2004/04/10 12:21:39 lukem Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.126 2004/07/20 10:40:22 lukem Exp $");
#endif
#endif /* not lint */
@@ -131,8 +131,9 @@ __RCSID("$NetBSD: ftp.c,v 1.125 2004/04/10 12:21:39 lukem Exp $");
#include "ftp_var.h"
-volatile int abrtflag = 0;
-volatile int timeoutflag = 0;
+volatile sig_atomic_t abrtflag;
+volatile sig_atomic_t timeoutflag;
+
sigjmp_buf ptabort;
int ptabflg;
int ptflag = 0;
@@ -318,6 +319,7 @@ cmdabort(int notused)
{
int oerrno = errno;
+ sigint_raised = 1;
alarmtimer(0);
if (fromatty)
write(fileno(ttyout), "\n", 1);
@@ -601,6 +603,7 @@ abortxfer(int notused)
char msgbuf[100];
int len;
+ sigint_raised = 1;
alarmtimer(0);
mflag = 0;
abrtflag = 0;
@@ -1742,6 +1745,7 @@ psabort(int notused)
{
int oerrno = errno;
+ sigint_raised = 1;
alarmtimer(0);
abrtflag++;
errno = oerrno;
@@ -1838,6 +1842,7 @@ void
abortpt(int notused)
{
+ sigint_raised = 1;
alarmtimer(0);
if (fromatty)
write(fileno(ttyout), "\n", 1);
@@ -2056,6 +2061,7 @@ abort_squared(int dummy)
char msgbuf[100];
int len;
+ sigint_raised = 1;
alarmtimer(0);
len = strlcpy(msgbuf, "\nremote abort aborted; closing connection.\n",
sizeof(msgbuf));