summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2019-11-10 16:39:30 +0800
committerNagi5Yeq <wu@x-nagi.com>2019-11-10 16:39:30 +0800
commitce21a3382ae89a058e693e1b7027b67dc86692b0 (patch)
treefb8f9d7bbe7be0e8459cf7f63fed08f64942b1ba
parent4e52dd856df5871424b62a0c042fda13c46f2d98 (diff)
fix bug in announce uri
-rw-r--r--src/DefaultBtAnnounce.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/DefaultBtAnnounce.cc b/src/DefaultBtAnnounce.cc
index f5bbfd61..087af61f 100644
--- a/src/DefaultBtAnnounce.cc
+++ b/src/DefaultBtAnnounce.cc
@@ -170,14 +170,14 @@ std::string DefaultBtAnnounce::getAnnounceUrl()
util::percentEncode(bittorrent::getStaticPeerId(), PEER_ID_LENGTH)
.c_str());
if (tcpPort_) {
- uri += fmt("&port=%u", tcpPort_);
+ uri += fmt("port=%u&", tcpPort_);
}
uri += fmt("uploaded=%" PRId64 "&"
"downloaded=%" PRId64 "&"
"left=%" PRId64 "&"
"numwant=%d&"
"key=%x&"
- "compact=1&",
+ "compact=1",
stat.getSessionUploadLength(), stat.getSessionDownloadLength(), left,
numWant,
(unsigned int)httpAnnounceKey_);