1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Also call 'tox_add_tcp_relay()'

This commit is contained in:
Ansa89 2015-05-29 14:47:30 +02:00
parent 6fff75bb34
commit 22d1ab34f9

View File

@ -425,7 +425,7 @@ void Core::bootstrapDht()
{
const Settings::DhtServer& dhtServer = dhtServerList[j % listSize];
if (tox_bootstrap(tox, dhtServer.address.toLatin1().data(),
dhtServer.port, CUserId(dhtServer.userId).data(), nullptr) == 1)
dhtServer.port, CUserId(dhtServer.userId).data(), nullptr))
{
qDebug() << "Bootstrapping from " + dhtServer.name
+ ", addr " + dhtServer.address.toLatin1().data()
@ -436,6 +436,18 @@ void Core::bootstrapDht()
qDebug() << "Error bootstrapping from "+dhtServer.name;
}
if (tox_add_tcp_relay(tox, dhtServer.address.toLatin1().data(),
dhtServer.port, CUserId(dhtServer.userId).data(), nullptr))
{
qDebug() << "Adding TCP relay from " + dhtServer.name
+ ", addr " + dhtServer.address.toLatin1().data()
+ ", port " + QString().setNum(dhtServer.port);
}
else
{
qDebug() << "Error adding TCP relay from "+dhtServer.name;
}
j++;
i++;
}