summaryrefslogtreecommitdiff
path: root/src/ConsoleStatCalc.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-11-25 15:49:20 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-11-25 15:49:20 +0000
commit46d9f2de6373007895e84f577aa8ae413cd4e861 (patch)
tree5ab170329d937cb4fea2f04c76675062b832d0f5 /src/ConsoleStatCalc.cc
parenta26a44cb8ed28d59930bfaa4553fbd1fa7fbcb4d (diff)
2009-11-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug which causes segmentation fault with tellWaiting XML-RPC method when BitTorrent download is waiting. The key of BtRegistry is changed from info hash to GID, because it is registered per RequestGroup, not info hash. * src/BtRegistry.cc * src/BtRegistry.h * src/BtSetup.cc * src/ConsoleStatCalc.cc * src/InitiatorMSEHandshakeCommand.cc * src/PeerInitiateConnectionCommand.cc * src/PeerInteractionCommand.cc * src/PeerInteractionCommand.h * src/PeerReceiveHandshakeCommand.cc * src/RequestGroup.cc * src/XmlRpcMethodImpl.cc * test/BtRegistryTest.cc * test/XmlRpcMethodTest.cc
Diffstat (limited to 'src/ConsoleStatCalc.cc')
-rw-r--r--src/ConsoleStatCalc.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ConsoleStatCalc.cc b/src/ConsoleStatCalc.cc
index 25449ce5..10dc5140 100644
--- a/src/ConsoleStatCalc.cc
+++ b/src/ConsoleStatCalc.cc
@@ -116,10 +116,8 @@ static void printProgress
<< rg->getNumConnection();
#ifdef ENABLE_BITTORRENT
if(rg->getDownloadContext()->hasAttribute(bittorrent::BITTORRENT)) {
- const BDE& torrentAttrs =
- rg->getDownloadContext()->getAttribute(bittorrent::BITTORRENT);
SharedHandle<PeerStorage> ps =
- e->getBtRegistry()->get(torrentAttrs[bittorrent::INFO_HASH].s())._peerStorage;
+ e->getBtRegistry()->get(rg->getGID())._peerStorage;
std::deque<SharedHandle<Peer> > peers;
ps->getActivePeers(peers);
o << " " << "SEED:"