From c6d080f75d7c4d2c92c5c68e1be268f01d836092 Mon Sep 17 00:00:00 2001 From: Victor Grishchenko Date: Wed, 20 Jan 2010 17:34:01 +0100 Subject: [PATCH] make it testing friendly --- SConstruct | 4 ---- exec/leecher.cpp | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index 0764672..079e965 100644 --- a/SConstruct +++ b/SConstruct @@ -5,10 +5,6 @@ # - scons: Cross-platform build system http://www.scons.org/ # - googletest: Google C++ Test Framework http://code.google.com/p/googletest/ # * Install in ..\gtest-1.4.0 -# - OpenSSL: http://www.slproweb.com/products/Win32OpenSSL.html -# * Install non-light Win32 binary in \openssl -# * Using a openssl-0.9.8k tar-ball doesn't work as the includes there -# are symbolic links which get turned into 0 length files by 7Zip. # import os diff --git a/exec/leecher.cpp b/exec/leecher.cpp index c07253f..29438eb 100644 --- a/exec/leecher.cpp +++ b/exec/leecher.cpp @@ -50,7 +50,9 @@ int main (int argn, char** args) { int file = p2tp::Open(filename,root_hash); printf("Downloading %s\n",root_hash.hex().c_str()); - while (true) {//!p2tp::IsComplete(file)) { + tint start = NOW; + + while (!p2tp::IsComplete(file) && NOW-start