Check for a non-empty response from litelib_execute
This commit is contained in:
@@ -636,7 +636,7 @@ bool NewSeedPage::validatePage() {
|
|||||||
|
|
||||||
// TODO: this is duplicated code that should be refactored
|
// TODO: this is duplicated code that should be refactored
|
||||||
// into a dedicated function
|
// into a dedicated function
|
||||||
if (reply.toUpper().trimmed() != "OK") {
|
if (reply.isEmpty()) {
|
||||||
qDebug() << "Lite server " << parent->server << " is down, getting a random one";
|
qDebug() << "Lite server " << parent->server << " is down, getting a random one";
|
||||||
parent->server = Settings::getRandomServer();
|
parent->server = Settings::getRandomServer();
|
||||||
qDebug() << __func__ << ": new server is " << parent->server;
|
qDebug() << __func__ << ": new server is " << parent->server;
|
||||||
@@ -771,7 +771,7 @@ bool RestoreSeedPage::validatePage() {
|
|||||||
|
|
||||||
// TODO: this is duplicated code that should be refactored
|
// TODO: this is duplicated code that should be refactored
|
||||||
// into a dedicated function
|
// into a dedicated function
|
||||||
if (reply.toUpper().trimmed() != "OK") {
|
if (reply.isEmpty()) {
|
||||||
qDebug() << "Lite server " << parent->server << " is down, getting a random one";
|
qDebug() << "Lite server " << parent->server << " is down, getting a random one";
|
||||||
parent->server = Settings::getRandomServer();
|
parent->server = Settings::getRandomServer();
|
||||||
qDebug() << __func__ << ": new server is " << parent->server;
|
qDebug() << __func__ << ": new server is " << parent->server;
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
qDebug() << __func__ << ": caught an exception, ignoring: " << e.what();
|
qDebug() << __func__ << ": caught an exception, ignoring: " << e.what();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reply.toUpper().trimmed() != "OK") {
|
if (reply.isEmpty()) {
|
||||||
qDebug() << "Lite server " << config->server << " is down, getting a random one";
|
qDebug() << "Lite server " << config->server << " is down, getting a random one";
|
||||||
config->server = Settings::getRandomServer();
|
config->server = Settings::getRandomServer();
|
||||||
qDebug() << __func__ << ": new server is " << config->server;
|
qDebug() << __func__ << ": new server is " << config->server;
|
||||||
|
|||||||
Reference in New Issue
Block a user