Merge pull request 'Restore backward compatibility with qt 5.12.0 issue: #141 , check libsodium sha256 checksum issue: #140' (#142) from lucretius/SilentDragonLite:dev into dev
Reviewed-on: https://git.hush.is/hush/SilentDragonLite/pulls/142
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -29,6 +29,18 @@ if [ ! -f libsodium-1.0.18.tar.gz ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
if [ ! -d libsodium-1.0.18 ]; then
|
||||||
echo "Unpacking libsodium $VERSION"
|
echo "Unpacking libsodium $VERSION"
|
||||||
tar xf libsodium-1.0.18.tar.gz
|
tar xf libsodium-1.0.18.tar.gz
|
||||||
|
|||||||
Binary file not shown.
@@ -116,7 +116,7 @@ void ConnectionLoader::ShowProgress()
|
|||||||
DEBUG("Created syncTimer");
|
DEBUG("Created syncTimer");
|
||||||
connection->doRPC("sync", "", [=](auto) {
|
connection->doRPC("sync", "", [=](auto) {
|
||||||
qDebug()<< "Finished syncing";
|
qDebug()<< "Finished syncing";
|
||||||
isSyncing->storeRelaxed(false);
|
isSyncing->store(false);
|
||||||
syncTimer->deleteLater();
|
syncTimer->deleteLater();
|
||||||
this->doRPCSetConnectionShield(connection);
|
this->doRPCSetConnectionShield(connection);
|
||||||
}, [=](auto) {
|
}, [=](auto) {
|
||||||
@@ -124,7 +124,7 @@ void ConnectionLoader::ShowProgress()
|
|||||||
});
|
});
|
||||||
|
|
||||||
QObject::connect(syncTimer, &QTimer::timeout, [=]() {
|
QObject::connect(syncTimer, &QTimer::timeout, [=]() {
|
||||||
if (!isSyncing || !isSyncing->loadRelaxed()) {
|
if (!isSyncing || !isSyncing->load()) {
|
||||||
DEBUG("Syncing complete or isSyncing is null, stopping timer");
|
DEBUG("Syncing complete or isSyncing is null, stopping timer");
|
||||||
syncTimer->stop();
|
syncTimer->stop();
|
||||||
return;
|
return;
|
||||||
@@ -218,7 +218,7 @@ void ConnectionLoader::doAutoConnect()
|
|||||||
auto connection = makeConnection(config);
|
auto connection = makeConnection(config);
|
||||||
auto me = this;
|
auto me = this;
|
||||||
qDebug() << __func__ << ": server=" << config->server
|
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
|
// After the lib is initialized, try to do get info
|
||||||
connection->doRPC("info", "", [=](auto reply) {
|
connection->doRPC("info", "", [=](auto reply) {
|
||||||
@@ -226,7 +226,7 @@ void ConnectionLoader::doAutoConnect()
|
|||||||
connection->setInfo(reply);
|
connection->setInfo(reply);
|
||||||
DEBUG("getting Connection reply");
|
DEBUG("getting Connection reply");
|
||||||
isSyncing = new QAtomicInteger<bool>();
|
isSyncing = new QAtomicInteger<bool>();
|
||||||
isSyncing->storeRelaxed(true);
|
isSyncing->store(true);
|
||||||
DEBUG("isSyncing set to true");
|
DEBUG("isSyncing set to true");
|
||||||
|
|
||||||
// Do a sync at startup
|
// Do a sync at startup
|
||||||
@@ -234,7 +234,7 @@ void ConnectionLoader::doAutoConnect()
|
|||||||
DEBUG("Beginning sync at startup");
|
DEBUG("Beginning sync at startup");
|
||||||
connection->doRPC("sync", "", [=](auto) {
|
connection->doRPC("sync", "", [=](auto) {
|
||||||
qDebug()<<"finished syncing startup";
|
qDebug()<<"finished syncing startup";
|
||||||
isSyncing->storeRelaxed(false);
|
isSyncing->store(false);
|
||||||
// Cancel the timer
|
// Cancel the timer
|
||||||
syncTimer->deleteLater();
|
syncTimer->deleteLater();
|
||||||
// When sync is done, set the connection
|
// When sync is done, set the connection
|
||||||
@@ -245,7 +245,7 @@ void ConnectionLoader::doAutoConnect()
|
|||||||
QTimer::singleShot(5000, [=]() { // 5-second delay
|
QTimer::singleShot(5000, [=]() { // 5-second delay
|
||||||
connection->doRPC("sync", "", [=](auto) mutable {
|
connection->doRPC("sync", "", [=](auto) mutable {
|
||||||
qDebug()<<"sync success with server=" << config->server;
|
qDebug()<<"sync success with server=" << config->server;
|
||||||
isSyncing->storeRelaxed(false);
|
isSyncing->store(false);
|
||||||
// Cancel the timer
|
// Cancel the timer
|
||||||
syncTimer->deleteLater();
|
syncTimer->deleteLater();
|
||||||
// When sync is done, set the connection
|
// 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.
|
// While it is syncing, we'll show the status updates while it is alive.
|
||||||
QObject::connect(syncTimer, &QTimer::timeout, [=]() {
|
QObject::connect(syncTimer, &QTimer::timeout, [=]() {
|
||||||
DEBUG("Check the sync status");
|
DEBUG("Check the sync status");
|
||||||
if (isSyncing != nullptr && isSyncing->loadRelaxed()) {
|
if (isSyncing != nullptr && isSyncing->load()) {
|
||||||
DEBUG("Getting the sync status");
|
DEBUG("Getting the sync status");
|
||||||
try {
|
try {
|
||||||
connection->doRPC("syncstatus", "", [=](json reply) {
|
connection->doRPC("syncstatus", "", [=](json reply) {
|
||||||
|
|||||||
Reference in New Issue
Block a user