From eb37b9af6487a57618d5ad9a315e3fdf1d17ff95 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 20 Nov 2009 07:06:12 +0000 Subject: [PATCH] intentional vandalism git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@606 e16421f0-f15b-0410-abcd-98678b794739 --- exec/trial.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exec/trial.cpp b/exec/trial.cpp index aac40cb..9d0b75c 100644 --- a/exec/trial.cpp +++ b/exec/trial.cpp @@ -20,7 +20,7 @@ using namespace p2tp; /** P2TP downloader. Params: root hash, filename, tracker ip/port, own ip/port */ int main (int argn, char** args) { - + THIS IS NOT TRIAL BRANCH srand(time(NULL)); Sha1Hash root_hash(true,"32e5d9d2d8c0f6073e2820cf47b15b58c2e42a23"); p2tp::LibraryInit(); @@ -28,7 +28,10 @@ int main (int argn, char** args) { // Arno: use tempdir std::string tmpdir = gettmpdir(); std::string sfn = tmpdir+"team.jpg"; - const char* filename = sfn.c_str(); + std::string hfn = tmpdir+"team.jpg.mhash"; + const char* filename = strdup(sfn.c_str()); + unlink(filename); + unlink(hfn.c_str()); Address tracker("victor.p2p-next.org:12345"), bindaddr((uint32_t)INADDR_ANY,10000), -- 2.20.1