From: P2P-Next Date: Fri, 20 Aug 2010 13:18:41 +0000 (+0300) Subject: instrumentation/hrktorrent: add nohashcheck option X-Git-Tag: next-share-m32~3 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=b76bdc01f1a6c3c96a43fe91c9027034f70bdcb4;p=cs-p2p-next.git instrumentation/hrktorrent: add nohashcheck option --- 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