diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-12-04 10:32:30 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-04 10:32:30 +0900 |
| commit | 4473b870f49f0339491eeb2443f21848b59f2c1f (patch) | |
| tree | b5ca7e657f087b9e1a53621c651699a9135a56ed | |
| parent | 7a089ae04aff2e4e4dacb97ec12387cd6f407a0e (diff) | |
| parent | c679390392fb4e3d34ace91fd1a6802d8bbb3d51 (diff) | |
Merge pull request #795 from aria2/show-dht-nodes
Print DHT nodes with -S option
| -rw-r--r-- | src/bittorrent_helper.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bittorrent_helper.h b/src/bittorrent_helper.h index 795dc639..daa72e37 100644 --- a/src/bittorrent_helper.h +++ b/src/bittorrent_helper.h @@ -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(), |
