summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2019-07-21 14:24:53 +0300
committerdartraiden <wowemuh@gmail.com>2019-07-21 14:24:53 +0300
commit000363bb208a4de33f401136e7425ba0c8af50ec (patch)
tree6791558c36b3caebeff7a89c30d8f126c2e70976
parentd1bfe6d77f8cd4ee92b579287135629c6368bac2 (diff)
libcurl: update to 7.65.3
-rw-r--r--libs/libcurl/docs/CHANGES60
-rw-r--r--libs/libcurl/docs/THANKS1
-rw-r--r--libs/libcurl/include/curl/curlver.h8
-rw-r--r--libs/libcurl/src/config-win32.h4
-rw-r--r--libs/libcurl/src/libcurl.plist6
-rw-r--r--libs/libcurl/src/progress.c226
6 files changed, 135 insertions, 170 deletions
diff --git a/libs/libcurl/docs/CHANGES b/libs/libcurl/docs/CHANGES
index 57280ebcc6..447b46a526 100644
--- a/libs/libcurl/docs/CHANGES
+++ b/libs/libcurl/docs/CHANGES
@@ -6,6 +6,25 @@
Changelog
+Version 7.65.3 (19 Jul 2019)
+
+Daniel Stenberg (19 Jul 2019)
+- RELEASE-NOTES: 7.65.3
+
+- THANKS: 7.65.3 status
+
+- progress: make the progress meter appear again
+
+ Fix regression caused by 21080e1
+
+ Reported-by: Chih-Hsuan Yen
+ Fixes #4122
+ Closes #4124
+
+- version: bump to 7.65.3
+
+- RELEASE-NOTES: Contributors or now 1990
+
Version 7.65.2 (17 Jul 2019)
Daniel Stenberg (17 Jul 2019)
@@ -7994,44 +8013,3 @@ Daniel Stenberg (18 Sep 2018)
- examples/http2-pushinmemory: receive HTTP/2 pushed files in memory
Closes #3004
-
-Daniel Gustafsson (18 Sep 2018)
-- darwinssl: Fix realloc memleak
-
- The reallocation was using the input pointer for the return value, which
- leads to a memory leak on reallication failure. Fix by instead use the
- safe internal API call Curl_saferealloc().
-
- Closes #3005
- Reviewed-by: Daniel Stenberg <daniel@haxx.se>
- Reviewed-by: Nick Zitzmann <nickzman@gmail.com>
-
-- [Kruzya brought this change]
-
- examples: Fix memory leaks from realloc errors
-
- Make sure to not overwrite the reallocated pointer in realloc() calls
- to avoid a memleak on memory errors.
-
-- memory: add missing curl_printf header
-
- ftp_send_command() was using vsnprintf() without including the libcurl
- *rintf() replacement header. Fix by including curl_printf.h and also
- add curl_memory.h while at it since memdebug.h depends on it.
-
- Closes #2999
- Reviewed-by: Daniel Stenberg <daniel@haxx.se>
-
-Daniel Stenberg (16 Sep 2018)
-- [Si brought this change]
-
- curl: update --tlsv* descriptions in --help output
-
- Closes #2994
-
-- http: made Curl_add_buffer functions take a pointer-pointer
-
- ... so that they can clear the original pointer on failure, which makes
- the error-paths and their cleanups easier.
-
- Closes #2992
diff --git a/libs/libcurl/docs/THANKS b/libs/libcurl/docs/THANKS
index 16c3c378ee..385ecd8518 100644
--- a/libs/libcurl/docs/THANKS
+++ b/libs/libcurl/docs/THANKS
@@ -274,6 +274,7 @@ Charles Romestant
Chen Prog
Chester Liu
Chih-Chung Chang
+Chih-Hsuan Yen
Chris "Bob Bob"
Chris Araman
Chris Carlmar
diff --git a/libs/libcurl/include/curl/curlver.h b/libs/libcurl/include/curl/curlver.h
index c753cff6f2..3e8789e86b 100644
--- a/libs/libcurl/include/curl/curlver.h
+++ b/libs/libcurl/include/curl/curlver.h
@@ -30,13 +30,13 @@
/* This is the version number of the libcurl package from which this header
file origins: */
-#define LIBCURL_VERSION "7.65.2"
+#define LIBCURL_VERSION "7.65.3"
/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBCURL_VERSION_MAJOR 7
#define LIBCURL_VERSION_MINOR 65
-#define LIBCURL_VERSION_PATCH 2
+#define LIBCURL_VERSION_PATCH 3
/* This is the numeric version of the libcurl version number, meant for easier
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
@@ -57,7 +57,7 @@
CURL_VERSION_BITS() macro since curl's own configure script greps for it
and needs it to contain the full number.
*/
-#define LIBCURL_VERSION_NUM 0x074102
+#define LIBCURL_VERSION_NUM 0x074103
/*
* This is the date and time when the full source package was created. The
@@ -68,7 +68,7 @@
*
* "2007-11-23"
*/
-#define LIBCURL_TIMESTAMP "2019-07-17"
+#define LIBCURL_TIMESTAMP "2019-07-19"
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
#define CURL_AT_LEAST_VERSION(x,y,z) \
diff --git a/libs/libcurl/src/config-win32.h b/libs/libcurl/src/config-win32.h
index 5b028f193f..90c1054765 100644
--- a/libs/libcurl/src/config-win32.h
+++ b/libs/libcurl/src/config-win32.h
@@ -246,10 +246,6 @@
/* Define if you have the socket function. */
#define HAVE_SOCKET 1
-/* Define if libSSH2 is in use */
-#define USE_LIBSSH2 1
-#define HAVE_LIBSSH2_H 1
-
/* Define if you have the strcasecmp function. */
/* #define HAVE_STRCASECMP 1 */
diff --git a/libs/libcurl/src/libcurl.plist b/libs/libcurl/src/libcurl.plist
index 46106abd8b..c0adf43f54 100644
--- a/libs/libcurl/src/libcurl.plist
+++ b/libs/libcurl/src/libcurl.plist
@@ -15,7 +15,7 @@
<string>se.haxx.curl.libcurl</string>
<key>CFBundleVersion</key>
- <string>7.65.2</string>
+ <string>7.65.3</string>
<key>CFBundleName</key>
<string>libcurl</string>
@@ -27,9 +27,9 @@
<string>????</string>
<key>CFBundleShortVersionString</key>
- <string>libcurl 7.65.2</string>
+ <string>libcurl 7.65.3</string>
<key>CFBundleGetInfoString</key>
- <string>libcurl.plist 7.65.2</string>
+ <string>libcurl.plist 7.65.3</string>
</dict>
</plist>
diff --git a/libs/libcurl/src/progress.c b/libs/libcurl/src/progress.c
index 7282e02321..9f953ef5a1 100644
--- a/libs/libcurl/src/progress.c
+++ b/libs/libcurl/src/progress.c
@@ -364,13 +364,15 @@ void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size)
}
}
-static void progress_calc(struct connectdata *conn, struct curltime now)
+/* returns TRUE if it's time to show the progress meter */
+static bool progress_calc(struct connectdata *conn, struct curltime now)
{
curl_off_t timespent;
curl_off_t timespent_ms; /* milliseconds */
struct Curl_easy *data = conn->data;
curl_off_t dl = data->progress.downloaded;
curl_off_t ul = data->progress.uploaded;
+ bool timetoshow = FALSE;
/* The time spent so far (from the start) */
data->progress.timespent = Curl_timediff_us(now, data->progress.start);
@@ -394,6 +396,7 @@ static void progress_calc(struct connectdata *conn, struct curltime now)
int countindex; /* amount of seconds stored in the speeder array */
int nowindex = data->progress.speeder_c% CURR_TIME;
data->progress.lastshow = now.tv_sec;
+ timetoshow = TRUE;
/* Let's do the "current speed" thing, with the dl + ul speeds
combined. Store the speed at entry 'nowindex'. */
@@ -452,133 +455,119 @@ static void progress_calc(struct connectdata *conn, struct curltime now)
data->progress.ulspeed + data->progress.dlspeed;
} /* Calculations end */
+ return timetoshow;
}
#ifndef CURL_DISABLE_PROGRESS_METER
-static void progress_meter(struct connectdata *conn,
- struct curltime now)
+static void progress_meter(struct connectdata *conn)
{
struct Curl_easy *data = conn->data;
- bool shownow = FALSE;
- if(data->progress.lastshow != now.tv_sec) {
- if(!(data->progress.flags & PGRS_HIDE))
- shownow = TRUE;
- }
-
- if(!shownow)
- /* only show the internal progress meter once per second */
- return;
- else {
- /* If there's no external callback set, use internal code to show
- progress */
- /* progress meter has not been shut off */
- char max5[6][10];
- curl_off_t dlpercen = 0;
- curl_off_t ulpercen = 0;
- curl_off_t total_percen = 0;
- curl_off_t total_transfer;
- curl_off_t total_expected_transfer;
- char time_left[10];
- char time_total[10];
- char time_spent[10];
- curl_off_t ulestimate = 0;
- curl_off_t dlestimate = 0;
- curl_off_t total_estimate;
- curl_off_t timespent =
- (curl_off_t)data->progress.timespent/1000000; /* seconds */
-
- if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
- if(data->state.resume_from) {
- fprintf(data->set.err,
- "** Resuming transfer from byte position %"
- CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from);
- }
+ char max5[6][10];
+ curl_off_t dlpercen = 0;
+ curl_off_t ulpercen = 0;
+ curl_off_t total_percen = 0;
+ curl_off_t total_transfer;
+ curl_off_t total_expected_transfer;
+ char time_left[10];
+ char time_total[10];
+ char time_spent[10];
+ curl_off_t ulestimate = 0;
+ curl_off_t dlestimate = 0;
+ curl_off_t total_estimate;
+ curl_off_t timespent =
+ (curl_off_t)data->progress.timespent/1000000; /* seconds */
+
+ if(!(data->progress.flags & PGRS_HEADERS_OUT)) {
+ if(data->state.resume_from) {
fprintf(data->set.err,
- " %% Total %% Received %% Xferd Average Speed "
- "Time Time Time Current\n"
- " Dload Upload "
- "Total Spent Left Speed\n");
- data->progress.flags |= PGRS_HEADERS_OUT; /* headers are shown */
- }
-
- /* Figure out the estimated time of arrival for the upload */
- if((data->progress.flags & PGRS_UL_SIZE_KNOWN) &&
- (data->progress.ulspeed > CURL_OFF_T_C(0))) {
- ulestimate = data->progress.size_ul / data->progress.ulspeed;
-
- if(data->progress.size_ul > CURL_OFF_T_C(10000))
- ulpercen = data->progress.uploaded /
- (data->progress.size_ul/CURL_OFF_T_C(100));
- else if(data->progress.size_ul > CURL_OFF_T_C(0))
- ulpercen = (data->progress.uploaded*100) /
- data->progress.size_ul;
- }
-
- /* ... and the download */
- if((data->progress.flags & PGRS_DL_SIZE_KNOWN) &&
- (data->progress.dlspeed > CURL_OFF_T_C(0))) {
- dlestimate = data->progress.size_dl / data->progress.dlspeed;
-
- if(data->progress.size_dl > CURL_OFF_T_C(10000))
- dlpercen = data->progress.downloaded /
- (data->progress.size_dl/CURL_OFF_T_C(100));
- else if(data->progress.size_dl > CURL_OFF_T_C(0))
- dlpercen = (data->progress.downloaded*100) /
- data->progress.size_dl;
+ "** Resuming transfer from byte position %"
+ CURL_FORMAT_CURL_OFF_T "\n", data->state.resume_from);
}
+ fprintf(data->set.err,
+ " %% Total %% Received %% Xferd Average Speed "
+ "Time Time Time Current\n"
+ " Dload Upload "
+ "Total Spent Left Speed\n");
+ data->progress.flags |= PGRS_HEADERS_OUT; /* headers are shown */
+ }
- /* Now figure out which of them is slower and use that one for the
- total estimate! */
- total_estimate = ulestimate>dlestimate?ulestimate:dlestimate;
-
- /* create the three time strings */
- time2str(time_left, total_estimate > 0?(total_estimate - timespent):0);
- time2str(time_total, total_estimate);
- time2str(time_spent, timespent);
-
- /* Get the total amount of data expected to get transferred */
- total_expected_transfer =
- ((data->progress.flags & PGRS_UL_SIZE_KNOWN)?
- data->progress.size_ul:data->progress.uploaded)+
- ((data->progress.flags & PGRS_DL_SIZE_KNOWN)?
- data->progress.size_dl:data->progress.downloaded);
-
- /* We have transferred this much so far */
- total_transfer = data->progress.downloaded + data->progress.uploaded;
+ /* Figure out the estimated time of arrival for the upload */
+ if((data->progress.flags & PGRS_UL_SIZE_KNOWN) &&
+ (data->progress.ulspeed > CURL_OFF_T_C(0))) {
+ ulestimate = data->progress.size_ul / data->progress.ulspeed;
+
+ if(data->progress.size_ul > CURL_OFF_T_C(10000))
+ ulpercen = data->progress.uploaded /
+ (data->progress.size_ul/CURL_OFF_T_C(100));
+ else if(data->progress.size_ul > CURL_OFF_T_C(0))
+ ulpercen = (data->progress.uploaded*100) /
+ data->progress.size_ul;
+ }
- /* Get the percentage of data transferred so far */
- if(total_expected_transfer > CURL_OFF_T_C(10000))
- total_percen = total_transfer /
- (total_expected_transfer/CURL_OFF_T_C(100));
- else if(total_expected_transfer > CURL_OFF_T_C(0))
- total_percen = (total_transfer*100) / total_expected_transfer;
+ /* ... and the download */
+ if((data->progress.flags & PGRS_DL_SIZE_KNOWN) &&
+ (data->progress.dlspeed > CURL_OFF_T_C(0))) {
+ dlestimate = data->progress.size_dl / data->progress.dlspeed;
+
+ if(data->progress.size_dl > CURL_OFF_T_C(10000))
+ dlpercen = data->progress.downloaded /
+ (data->progress.size_dl/CURL_OFF_T_C(100));
+ else if(data->progress.size_dl > CURL_OFF_T_C(0))
+ dlpercen = (data->progress.downloaded*100) /
+ data->progress.size_dl;
+ }
- fprintf(data->set.err,
- "\r"
- "%3" CURL_FORMAT_CURL_OFF_T " %s "
- "%3" CURL_FORMAT_CURL_OFF_T " %s "
- "%3" CURL_FORMAT_CURL_OFF_T " %s %s %s %s %s %s %s",
- total_percen, /* 3 letters */ /* total % */
- max5data(total_expected_transfer, max5[2]), /* total size */
- dlpercen, /* 3 letters */ /* rcvd % */
- max5data(data->progress.downloaded, max5[0]), /* rcvd size */
- ulpercen, /* 3 letters */ /* xfer % */
- max5data(data->progress.uploaded, max5[1]), /* xfer size */
- max5data(data->progress.dlspeed, max5[3]), /* avrg dl speed */
- max5data(data->progress.ulspeed, max5[4]), /* avrg ul speed */
- time_total, /* 8 letters */ /* total time */
- time_spent, /* 8 letters */ /* time spent */
- time_left, /* 8 letters */ /* time left */
- max5data(data->progress.current_speed, max5[5])
- );
-
- /* we flush the output stream to make it appear as soon as possible */
- fflush(data->set.err);
- } /* don't show now */
+ /* Now figure out which of them is slower and use that one for the
+ total estimate! */
+ total_estimate = ulestimate>dlestimate?ulestimate:dlestimate;
+
+ /* create the three time strings */
+ time2str(time_left, total_estimate > 0?(total_estimate - timespent):0);
+ time2str(time_total, total_estimate);
+ time2str(time_spent, timespent);
+
+ /* Get the total amount of data expected to get transferred */
+ total_expected_transfer =
+ ((data->progress.flags & PGRS_UL_SIZE_KNOWN)?
+ data->progress.size_ul:data->progress.uploaded)+
+ ((data->progress.flags & PGRS_DL_SIZE_KNOWN)?
+ data->progress.size_dl:data->progress.downloaded);
+
+ /* We have transferred this much so far */
+ total_transfer = data->progress.downloaded + data->progress.uploaded;
+
+ /* Get the percentage of data transferred so far */
+ if(total_expected_transfer > CURL_OFF_T_C(10000))
+ total_percen = total_transfer /
+ (total_expected_transfer/CURL_OFF_T_C(100));
+ else if(total_expected_transfer > CURL_OFF_T_C(0))
+ total_percen = (total_transfer*100) / total_expected_transfer;
+
+ fprintf(data->set.err,
+ "\r"
+ "%3" CURL_FORMAT_CURL_OFF_T " %s "
+ "%3" CURL_FORMAT_CURL_OFF_T " %s "
+ "%3" CURL_FORMAT_CURL_OFF_T " %s %s %s %s %s %s %s",
+ total_percen, /* 3 letters */ /* total % */
+ max5data(total_expected_transfer, max5[2]), /* total size */
+ dlpercen, /* 3 letters */ /* rcvd % */
+ max5data(data->progress.downloaded, max5[0]), /* rcvd size */
+ ulpercen, /* 3 letters */ /* xfer % */
+ max5data(data->progress.uploaded, max5[1]), /* xfer size */
+ max5data(data->progress.dlspeed, max5[3]), /* avrg dl speed */
+ max5data(data->progress.ulspeed, max5[4]), /* avrg ul speed */
+ time_total, /* 8 letters */ /* total time */
+ time_spent, /* 8 letters */ /* time spent */
+ time_left, /* 8 letters */ /* time left */
+ max5data(data->progress.current_speed, max5[5])
+ );
+
+ /* we flush the output stream to make it appear as soon as possible */
+ fflush(data->set.err);
}
#else
/* progress bar disabled */
-#define progress_meter(x,y)
+#define progress_meter(x) Curl_nop_stmt
#endif
@@ -590,8 +579,7 @@ int Curl_pgrsUpdate(struct connectdata *conn)
{
struct Curl_easy *data = conn->data;
struct curltime now = Curl_now(); /* what time is it */
-
- progress_calc(conn, now);
+ bool showprogress = progress_calc(conn, now);
if(!(data->progress.flags & PGRS_HIDE)) {
if(data->set.fxferinfo) {
int result;
@@ -621,8 +609,10 @@ int Curl_pgrsUpdate(struct connectdata *conn)
failf(data, "Callback aborted");
return result;
}
+
+ if(showprogress)
+ progress_meter(conn);
}
- progress_meter(conn, now);
return 0;
}