Fix bug that UDP port was incorrectly used in UDP tracker announce request

This commit is contained in:
Tatsuhiro Tsujikawa 2016-01-18 23:29:07 +09:00
parent 9b41970134
commit ddb94ebdac

View File

@ -300,7 +300,7 @@ TrackerWatcherCommand::createAnnounce(DownloadEngine* e)
if (udpTrackerClient_ &&
uri::getFieldString(res, USR_SCHEME, uri.c_str()) == "udp") {
uint16_t localPort;
localPort = e->getBtRegistry()->getUdpPort();
localPort = e->getBtRegistry()->getTcpPort();
treq =
createUDPAnnRequest(uri::getFieldString(res, USR_HOST, uri.c_str()),
res.port, localPort);