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

Revert "Updated for latest toxcore api"

This reverts commit 7c8334bca9.
This commit is contained in:
tux3 2015-05-25 20:23:06 +02:00
parent df7480f59c
commit c3e70d6c59

View File

@ -153,10 +153,6 @@ void Core::make_tox(QByteArray savedata)
toxOptions.proxy_host = nullptr;
toxOptions.proxy_port = 0;
toxOptions.savedata_type = (!savedata.isNull() ? TOX_SAVEDATA_TYPE_TOX_SAVE : TOX_SAVEDATA_TYPE_NONE);
toxOptions.savedata_data = (uint8_t*)savedata.data();
toxOptions.savedata_length = savedata.size();
if (proxyType != ProxyType::ptNone)
{
QString proxyAddr = Settings::getInstance().getProxyAddr();
@ -184,13 +180,13 @@ void Core::make_tox(QByteArray savedata)
}
}
tox = tox_new(&toxOptions, nullptr);
tox = tox_new(&toxOptions, (uint8_t*)savedata.data(), savedata.size(), nullptr);
if (tox == nullptr)
{
if (enableIPv6) // Fallback to IPv4
{
toxOptions.ipv6_enabled = false;
tox = tox_new(&toxOptions, nullptr);
tox = tox_new(&toxOptions, (uint8_t*)savedata.data(), savedata.size(), nullptr);
if (tox == nullptr)
{
if (toxOptions.proxy_type != TOX_PROXY_TYPE_NONE)