mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Fix #237, don't use ports in big endian
This commit is contained in:
parent
87eb5704ec
commit
cb9d626155
3
core.cpp
3
core.cpp
|
@ -780,9 +780,8 @@ void Core::bootstrapDht()
|
|||
while (i < (2 - (n>3)))
|
||||
{
|
||||
const Settings::DhtServer& dhtServer = dhtServerList[j % listSize];
|
||||
quint16 bitswappedPort = quint16(0|((dhtServer.port&0xff)<<8)|((dhtServer.port&0xff00)>>8));
|
||||
if (tox_bootstrap_from_address(tox, dhtServer.address.toLatin1().data(),
|
||||
qToBigEndian(bitswappedPort), CUserId(dhtServer.userId).data()) == 1)
|
||||
dhtServer.port, CUserId(dhtServer.userId).data()) == 1)
|
||||
qDebug() << QString("Core: Bootstraping from ")+dhtServer.name+QString(", addr ")+dhtServer.address.toLatin1().data()
|
||||
+QString(", port ")+QString().setNum(dhtServer.port);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user