From b76bdc01f1a6c3c96a43fe91c9027034f70bdcb4 Mon Sep 17 00:00:00 2001 From: P2P-Next Date: Fri, 20 Aug 2010 16:18:41 +0300 Subject: [PATCH] instrumentation/hrktorrent: add nohashcheck option --- instrumentation/hrktorrent/core.cpp | 4 ++++ instrumentation/hrktorrent/main.cpp | 6 +++++- instrumentation/hrktorrent/settings.cpp | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/instrumentation/hrktorrent/core.cpp b/instrumentation/hrktorrent/core.cpp index b85cad7..e2ad610 100644 --- a/instrumentation/hrktorrent/core.cpp +++ b/instrumentation/hrktorrent/core.cpp @@ -327,6 +327,10 @@ CCore::Run() parms.ti = info; parms.paused = false; + /* disable hash checking if configured */ + if (Settings->GetI("hashcheck") == 0) + parms.seed_mode = true; + _torrent = _session->add_torrent(parms); } catch(std::exception& e) { std::cerr << "Could not add torrent (" << e.what() <<")" << std::endl; diff --git a/instrumentation/hrktorrent/main.cpp b/instrumentation/hrktorrent/main.cpp index b1a25c5..bb506bd 100644 --- a/instrumentation/hrktorrent/main.cpp +++ b/instrumentation/hrktorrent/main.cpp @@ -26,6 +26,7 @@ printusage(const char *argv0) std::cout << "\t-t, --nodht\t\t\tdisable dht (default: on)\n"; std::cout << "\t-n, --noupnp\t\t\tdisable upnp (default: on)\n"; std::cout << "\t-s, --noseed\t\t\tdisable seeding (default: enabled)\n"; + std::cout << "\t-k, --nohashcheck\t\tdisable initial seeder hash checking (default: enabled)\n"; std::cout << "\t-f, --forcereannounce