diff --git a/res/liblibsodium.a b/res/liblibsodium.a deleted file mode 100644 index 363c743..0000000 Binary files a/res/liblibsodium.a and /dev/null differ diff --git a/res/libsodium.lib b/res/libsodium.lib deleted file mode 100644 index 7a93b9d..0000000 Binary files a/res/libsodium.lib and /dev/null differ diff --git a/res/libsodium/buildlibsodium.sh b/res/libsodium/buildlibsodium.sh index fe734fa..1e24807 100755 --- a/res/libsodium/buildlibsodium.sh +++ b/res/libsodium/buildlibsodium.sh @@ -29,6 +29,18 @@ if [ ! -f libsodium-1.0.18.tar.gz ]; then exit 1 fi +# Sha256 checksum for ibsodium-1.0.18.tar.gz +EXPECTED_CHECKSUM="6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1" + +# Check if the checksum matchs +echo "Checking SHA256 Checksum for libsodium $VERSION" +ACTUAL_CHECKSUM=$(sha256sum libsodium-1.0.18.tar.gz | awk '{ print $1 }') + +if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then + echo "Error: The checksum of libsodium does not match the expected checksum. " + exit 1 +fi + if [ ! -d libsodium-1.0.18 ]; then echo "Unpacking libsodium $VERSION" tar xf libsodium-1.0.18.tar.gz diff --git a/res/libsodiumd.lib b/res/libsodiumd.lib deleted file mode 100644 index 98a68f8..0000000 Binary files a/res/libsodiumd.lib and /dev/null differ diff --git a/src/connection.cpp b/src/connection.cpp index ac1b0a1..5991951 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -116,7 +116,7 @@ void ConnectionLoader::ShowProgress() DEBUG("Created syncTimer"); connection->doRPC("sync", "", [=](auto) { qDebug()<< "Finished syncing"; - isSyncing->storeRelaxed(false); + isSyncing->store(false); syncTimer->deleteLater(); this->doRPCSetConnectionShield(connection); }, [=](auto) { @@ -124,7 +124,7 @@ void ConnectionLoader::ShowProgress() }); QObject::connect(syncTimer, &QTimer::timeout, [=]() { - if (!isSyncing || !isSyncing->loadRelaxed()) { + if (!isSyncing || !isSyncing->load()) { DEBUG("Syncing complete or isSyncing is null, stopping timer"); syncTimer->stop(); return; @@ -218,7 +218,7 @@ void ConnectionLoader::doAutoConnect() auto connection = makeConnection(config); auto me = this; qDebug() << __func__ << ": server=" << config->server - << " connection=" << connection << " me=" << me << Qt::endl; + << " connection=" << connection << " me=" << me << endl; // After the lib is initialized, try to do get info connection->doRPC("info", "", [=](auto reply) { @@ -226,7 +226,7 @@ void ConnectionLoader::doAutoConnect() connection->setInfo(reply); DEBUG("getting Connection reply"); isSyncing = new QAtomicInteger(); - isSyncing->storeRelaxed(true); + isSyncing->store(true); DEBUG("isSyncing set to true"); // Do a sync at startup @@ -234,7 +234,7 @@ void ConnectionLoader::doAutoConnect() DEBUG("Beginning sync at startup"); connection->doRPC("sync", "", [=](auto) { qDebug()<<"finished syncing startup"; - isSyncing->storeRelaxed(false); + isSyncing->store(false); // Cancel the timer syncTimer->deleteLater(); // When sync is done, set the connection @@ -245,7 +245,7 @@ void ConnectionLoader::doAutoConnect() QTimer::singleShot(5000, [=]() { // 5-second delay connection->doRPC("sync", "", [=](auto) mutable { qDebug()<<"sync success with server=" << config->server; - isSyncing->storeRelaxed(false); + isSyncing->store(false); // Cancel the timer syncTimer->deleteLater(); // When sync is done, set the connection @@ -259,7 +259,7 @@ void ConnectionLoader::doAutoConnect() // While it is syncing, we'll show the status updates while it is alive. QObject::connect(syncTimer, &QTimer::timeout, [=]() { DEBUG("Check the sync status"); - if (isSyncing != nullptr && isSyncing->loadRelaxed()) { + if (isSyncing != nullptr && isSyncing->load()) { DEBUG("Getting the sync status"); try { connection->doRPC("syncstatus", "", [=](json reply) {