From 4e2bc42a4beb7899e6b31376ce45f3eb9a47b420 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 18 Nov 2009 12:31:06 +0000 Subject: [PATCH] logging cleanups git-svn-id: https://ttuki.vtt.fi/svn/p2p-next/TUD/p2tp/trunk@580 e16421f0-f15b-0410-abcd-98678b794739 --- p2tp.cpp | 1 + p2tp.h | 2 ++ transfer.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/p2tp.cpp b/p2tp.cpp index 491e04c..264e055 100644 --- a/p2tp.cpp +++ b/p2tp.cpp @@ -50,6 +50,7 @@ Channel::Channel (FileTransfer* transfer, int socket, Address peer_addr) : this->id = channels.size(); channels.push_back(this); cc_ = new PingPongController(this); + dprintf("%s #%i init %s\n",tintstr(),id,peer_.str().c_str()); Schedule(NOW); // FIXME ugly } diff --git a/p2tp.h b/p2tp.h index 5a1a715..509179e 100644 --- a/p2tp.h +++ b/p2tp.h @@ -168,6 +168,8 @@ namespace p2tp { /** Messages we are accepting. */ uint64_t cap_out_; + + tint init_time_; protected: void OnDataIn (bin64_t pos); diff --git a/transfer.cpp b/transfer.cpp index 8c2d42d..97979b8 100644 --- a/transfer.cpp +++ b/transfer.cpp @@ -35,6 +35,7 @@ FileTransfer::FileTransfer (const char* filename, const Sha1Hash& _root_hash) : files[fd()] = this; picker_ = new SeqPiecePicker(this); picker_->Randomize(rand()&63); + init_time_ = Datagram::Time(); } -- 2.20.1