[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-1136-g74207af
Brad King
brad.king at kitware.com
Mon Mar 17 11:08:46 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 74207af6bb3fa7a3e6be1ebd0d1a82e4fa8d82ae (commit)
via 413282c0cfb0bafc6ab325c6d4798e4765e021fa (commit)
from 8f4867c9607a3cb71d200e143f8b8683466bc43c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74207af6bb3fa7a3e6be1ebd0d1a82e4fa8d82ae
commit 74207af6bb3fa7a3e6be1ebd0d1a82e4fa8d82ae
Merge: 8f4867c 413282c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 17 11:08:45 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 17 11:08:45 2014 -0400
Merge topic 'file-DOWNLOAD-cap-progress' into next
413282c0 file: Avoid runaway DOWNLOAD/UPLOAD progress reports (#14807)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=413282c0cfb0bafc6ab325c6d4798e4765e021fa
commit 413282c0cfb0bafc6ab325c6d4798e4765e021fa
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 17 11:05:34 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Mar 17 11:05:34 2014 -0400
file: Avoid runaway DOWNLOAD/UPLOAD progress reports (#14807)
Curl makes progress callbacks frequently but we round to the nearest
percent and report only when that changes so that we make at most 101
progress reports. However, when unexpected data beyond the total are
transferred the progress can get beyond 100% and lead to unlimited
reports. Avoid this case by capping the reported progress to 100%.
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 9fabdc7..5bfb664 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2539,6 +2539,11 @@ namespace {
if (total > 0.0)
{
this->CurrentPercentage = static_cast<int>(value/total*100.0 + 0.5);
+ if(this->CurrentPercentage > 100)
+ {
+ // Avoid extra progress reports for unexpected data beyond total.
+ this->CurrentPercentage = 100;
+ }
}
bool updated = (OldPercentage != this->CurrentPercentage);
-----------------------------------------------------------------------
Summary of changes:
Source/cmFileCommand.cxx | 5 +++++
1 file changed, 5 insertions(+)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list