From: Daniel Stenberg Date: Fri, 9 Jun 2017 09:16:18 +0000 (+0200) Subject: progress: let "current speed" be UL + DL speeds combined X-Git-Tag: curl-7_55_0~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1213baba27a30a14f917e3c8c044f22cac2389b6;p=thirdparty%2Fcurl.git progress: let "current speed" be UL + DL speeds combined Bug #1556 Reported-by: Paul Harris Closes #1559 --- diff --git a/lib/progress.c b/lib/progress.c index 1996d78dcc..ccabe3c5d6 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -380,11 +380,10 @@ int Curl_pgrsUpdate(struct connectdata *conn) data->progress.lastshow = now.tv_sec; - /* Let's do the "current speed" thing, which should use the fastest - of the dl/ul speeds. Store the faster speed at entry 'nowindex'. */ + /* Let's do the "current speed" thing, with the dl + ul speeds + combined. Store the speed at entry 'nowindex'. */ data->progress.speeder[ nowindex ] = - data->progress.downloaded>data->progress.uploaded? - data->progress.downloaded:data->progress.uploaded; + data->progress.downloaded + data->progress.uploaded; /* remember the exact time for this moment */ data->progress.speeder_time [ nowindex ] = now; @@ -433,10 +432,9 @@ int Curl_pgrsUpdate(struct connectdata *conn) } } else - /* the first second we use the main average */ + /* the first second we use the average */ data->progress.current_speed = - (data->progress.ulspeed>data->progress.dlspeed)? - data->progress.ulspeed:data->progress.dlspeed; + data->progress.ulspeed + data->progress.dlspeed; } /* Calculations end */