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

fix(core): Correct getSelfDhtId's toxcore API

This commit is contained in:
Anthony Bilinski 2022-03-13 00:41:08 -08:00
parent 47328cc6bf
commit faa72d567e
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -42,6 +42,8 @@
#include <QStringBuilder>
#include <QTimer>
#include <tox/tox.h>
#include <algorithm>
#include <cassert>
#include <chrono>
@ -1317,7 +1319,7 @@ QByteArray Core::getSelfDhtId() const
{
QMutexLocker ml{&coreLoopLock};
QByteArray dhtKey(TOX_PUBLIC_KEY_SIZE, 0x00);
tox_self_get_public_key(tox.get(), reinterpret_cast<uint8_t*>(dhtKey.data()));
tox_self_get_dht_id(tox.get(), reinterpret_cast<uint8_t*>(dhtKey.data()));
return dhtKey;
}