1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-29 11:06:23 +00:00

Fix broken tr_sessionSetPeerPortRandom() function. (#3569)

This commit is contained in:
Viacheslav Chimishuk 2022-08-03 06:38:37 +03:00 committed by GitHub
parent df7a44adb2
commit 8e604b44a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1291,10 +1291,10 @@ uint16_t tr_sessionGetPeerPort(tr_session const* session)
uint16_t tr_sessionSetPeerPortRandom(tr_session* session)
{
TR_ASSERT(tr_isSession(session));
tr_port p = getRandomPort(session);
tr_sessionSetPeerPort(session, p.host());
session->setPeerPort(getRandomPort(session));
return session->private_peer_port.host();
return p.host();
}
void tr_sessionSetPeerPortRandomOnStart(tr_session* session, bool random)