summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNagi5Yeq <wu@x-nagi.com>2019-11-07 22:11:38 +0800
committerNagi5Yeq <wu@x-nagi.com>2019-11-07 22:11:38 +0800
commitbdaf5b93c5dd8c6fc3428168e7d0b11aa374b677 (patch)
tree454872ba3dba39288888624abe978f351c2d0cfd
parent942325b1ae98fdf496acfccfb95e21d8dae13a09 (diff)
remove ip parameter
-rw-r--r--src/DefaultBtAnnounce.cc8
-rw-r--r--test/DefaultBtAnnounceTest.cc2
2 files changed, 3 insertions, 7 deletions
diff --git a/src/DefaultBtAnnounce.cc b/src/DefaultBtAnnounce.cc
index cce627d1..f5bbfd61 100644
--- a/src/DefaultBtAnnounce.cc
+++ b/src/DefaultBtAnnounce.cc
@@ -177,10 +177,10 @@ std::string DefaultBtAnnounce::getAnnounceUrl()
"left=%" PRId64 "&"
"numwant=%d&"
"key=%x&"
- "compact=1&"
+ "compact=1&",
stat.getSessionUploadLength(), stat.getSessionDownloadLength(), left,
numWant,
- httpAnnounceKey_);
+ (unsigned int)httpAnnounceKey_);
const char* event = announceList_.getEventString();
if (option_->getAsBool(PREF_BT_FORCE_ENCRYPTION) ||
option_->getAsBool(PREF_BT_REQUIRE_CRYPTO)) {
@@ -197,10 +197,6 @@ std::string DefaultBtAnnounce::getAnnounceUrl()
else {
uri += "&supportcrypto=1";
}
- if (!option_->blank(PREF_BT_EXTERNAL_IP)) {
- uri += "&ip=";
- uri += option_->get(PREF_BT_EXTERNAL_IP);
- }
return uri;
}
diff --git a/test/DefaultBtAnnounceTest.cc b/test/DefaultBtAnnounceTest.cc
index 314e5c16..c463e3a3 100644
--- a/test/DefaultBtAnnounceTest.cc
+++ b/test/DefaultBtAnnounceTest.cc
@@ -357,7 +357,7 @@ void DefaultBtAnnounceTest::testGetAnnounceUrl_externalIP()
"info_hash=%01%23Eg%89%AB%CD%EF%01%23Eg%89%AB%CD%EF%01%23Eg&"
"peer_id=-aria2-ultrafastdltl&port=6989&uploaded=1572864&"
"downloaded=1310720&left=1572864&numwant=50&key=fastdltl&"
- "compact=1&supportcrypto=1&event=started&ip=192.168.1.1"),
+ "compact=1&supportcrypto=1&event=started"),
btAnnounce.getAnnounceUrl());
std::shared_ptr<UDPTrackerRequest> req;