From 6d349127cd3c045f13b24341dfc3e2970cbc4985 Mon Sep 17 00:00:00 2001 From: arno Date: Thu, 12 Nov 2009 14:41:59 +0000 Subject: [PATCH] - Use tmp dir to store data for trial. git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@542 e16421f0-f15b-0410-abcd-98678b794739 --- exec/trial.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/exec/trial.cpp b/exec/trial.cpp index 2989888..dad4fa0 100644 --- a/exec/trial.cpp +++ b/exec/trial.cpp @@ -8,6 +8,8 @@ */ #include "p2tp.h" #include +#include +#include "compat/util.h" using namespace p2tp; @@ -19,7 +21,13 @@ int main (int argn, char** args) { srand(time(NULL)); Sha1Hash root_hash(true,"32e5d9d2d8c0f6073e2820cf47b15b58c2e42a23"); p2tp::LibraryInit(); - const char* filename = "team.jpg"; + + // Arno: use tempdir + std::string tmpdir = gettmpdir(); + std::string sfn = tmpdir+"team.jpg"; + const char* filename = sfn.c_str(); + + Address tracker("130.161.211.198:10000"), bindaddr((uint32_t)INADDR_ANY,10000); if (0>p2tp::Listen(bindaddr)) { -- 2.20.1