Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2014 13:25:27 +0000 (UTC)
From:      Dag-Erling Smørgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r262558 - stable/10/usr.bin/fetch
Message-ID:  <201402271325.s1RDPRfX063557@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Thu Feb 27 13:25:26 2014
New Revision: 262558
URL: http://svnweb.freebsd.org/changeset/base/262558

Log:
  MFH (r261233): fix whitespace and bump copyright
  MFH (r261234): increase buffer size

Modified:
  stable/10/usr.bin/fetch/fetch.1
  stable/10/usr.bin/fetch/fetch.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/fetch/fetch.1
==============================================================================
--- stable/10/usr.bin/fetch/fetch.1	Thu Feb 27 13:19:17 2014	(r262557)
+++ stable/10/usr.bin/fetch/fetch.1	Thu Feb 27 13:25:26 2014	(r262558)
@@ -1,5 +1,5 @@
 .\"-
-.\" Copyright (c) 2000-2013 Dag-Erling Smørgrav
+.\" Copyright (c) 2000-2014 Dag-Erling Smørgrav
 .\" Copyright (c) 2013 Michael Gmelin <freebsd@grem.de>
 .\" All rights reserved.
 .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used
@@ -30,7 +30,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 30, 2013
+.Dd January 28, 2014
 .Dt FETCH 1
 .Os
 .Sh NAME
@@ -118,7 +118,7 @@ Automatically retry the transfer upon so
 Allow SSL version 2 when negotiating the connection.
 .It Fl B Ar bytes , Fl -buffer-size= Ns Ar bytes
 Specify the read buffer size in bytes.
-The default is 4096 bytes.
+The default is 16,384 bytes.
 Attempts to set a buffer size lower than this will be silently
 ignored.
 The number of reads actually performed is reported at verbosity level

Modified: stable/10/usr.bin/fetch/fetch.c
==============================================================================
--- stable/10/usr.bin/fetch/fetch.c	Thu Feb 27 13:19:17 2014	(r262557)
+++ stable/10/usr.bin/fetch/fetch.c	Thu Feb 27 13:25:26 2014	(r262558)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2000-2011 Dag-Erling Smørgrav
+ * Copyright (c) 2000-2014 Dag-Erling Smørgrav
  * Copyright (c) 2013 Michael Gmelin <freebsd@grem.de>
  * All rights reserved.
  *
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
 
 #include <fetch.h>
 
-#define MINBUFSIZE	4096
+#define MINBUFSIZE	16384
 #define TIMEOUT		120
 
 /* Option flags */
@@ -109,7 +109,7 @@ enum options
 	OPTION_SSL_CLIENT_KEY_FILE,
 	OPTION_SSL_CRL_FILE,
 	OPTION_SSL_NO_SSL3,
-	OPTION_SSL_NO_TLS1,	
+	OPTION_SSL_NO_TLS1,
 	OPTION_SSL_NO_VERIFY_HOSTNAME,
 	OPTION_SSL_NO_VERIFY_PEER
 };
@@ -147,7 +147,7 @@ static struct option longopts[] =
 	{ "passive-portrange-default", no_argument, NULL, 'T' },
 	{ "verbose", no_argument, NULL, 'v' },
 	{ "retry-delay", required_argument, NULL, 'w' },
-	
+
 	/* options without a single character equivalent */
 	{ "bind-address", required_argument, NULL, OPTION_BIND_ADDRESS },
 	{ "no-passive", no_argument, NULL, OPTION_NO_FTP_PASSIVE_MODE },
@@ -716,6 +716,7 @@ fetch(char *URL, const char *path)
 	sigalrm = siginfo = sigint = 0;
 
 	/* suck in the data */
+	setvbuf(f, NULL, _IOFBF, B_size);
 	signal(SIGINFO, sig_handler);
 	while (!sigint) {
 		if (us.size != -1 && us.size - count < B_size &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402271325.s1RDPRfX063557>