Skip to content

Commit

Permalink
Merge pull request aria2#795 from aria2/show-dht-nodes
Browse files Browse the repository at this point in the history
Print DHT nodes with -S option
  • Loading branch information
tatsuhiro-t authored Dec 4, 2016
2 parents 7a089ae + c679390 commit 4473b87
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bittorrent_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ void print(Output& o, const std::shared_ptr<DownloadContext>& dctx)
o.printf(" %s\n", (*i).c_str());
}
}
if (!torrentAttrs->nodes.empty()) {
o.write("Nodes:\n");
for (auto& p : torrentAttrs->nodes) {
o.printf(" %s:%u\n", p.first.c_str(), p.second);
}
}
o.printf("Name: %s\n", torrentAttrs->name.c_str());
o.printf("Magnet URI: %s\n", torrent2Magnet(torrentAttrs).c_str());
util::toStream(dctx->getFileEntries().begin(), dctx->getFileEntries().end(),
Expand Down

0 comments on commit 4473b87

Please sign in to comment.