From fe224658699af604d2574a5e1df208b736e3dde4 Mon Sep 17 00:00:00 2001 From: sehraf Date: Sat, 25 Aug 2018 17:53:30 +0200 Subject: [PATCH 1/2] fix proxy indicators not being updated --- retroshare-gui/src/gui/settings/ServerPage.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/settings/ServerPage.cpp b/retroshare-gui/src/gui/settings/ServerPage.cpp index a7885922c..b2ffd555b 100755 --- a/retroshare-gui/src/gui/settings/ServerPage.cpp +++ b/retroshare-gui/src/gui/settings/ServerPage.cpp @@ -191,7 +191,6 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags) std::cerr << std::endl; #endif - connect(ui.discComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(saveAddresses())); connect(ui.netModeComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(saveAddresses())); connect(ui.localAddress, SIGNAL(textChanged(QString)),this,SLOT(saveAddresses())); @@ -231,6 +230,10 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags) QObject::connect(ui.enableCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateRelayMode())); QObject::connect(ui.serverCheckBox,SIGNAL(toggled(bool)),this,SLOT(updateRelayMode())); + + // when the network menu is opened and the hidden service tab is already selected updateOutProxyIndicator() won't be called and thus resulting in wrong proxy indicators. + if (ui.tabWidget->currentIndex() == TAB_HIDDEN_SERVICE) + updateOutProxyIndicator(); } void ServerPage::saveAndTestInProxy() From 9557a5246e92b3f28fd978f7ff7d02a9f78978f2 Mon Sep 17 00:00:00 2001 From: sehraf Date: Sat, 25 Aug 2018 17:54:34 +0200 Subject: [PATCH 2/2] remove unnecessary locking, print log entries also to stdout --- libretroshare/src/util/rsdebug.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/util/rsdebug.cc b/libretroshare/src/util/rsdebug.cc index aade16282..434b06363 100644 --- a/libretroshare/src/util/rsdebug.cc +++ b/libretroshare/src/util/rsdebug.cc @@ -142,11 +142,12 @@ void rslog(const RsLog::logLvl lvl, RsLog::logInfo *info, const std::string &msg if(info->lvl == RsLog::None) return; - RsStackMutex stack(logMtx); /******** LOCKED ****************/ - bool process = info->lvl == RsLog::Default ? (lvl <= defaultLevel) : lvl <= info->lvl; - if(process) + if(!process) + return; + { + RsStackMutex stack(logMtx); /******** LOCKED ****************/ time_t t = time(NULL); if (debugMode == RS_DEBUG_LOGCRASH) @@ -179,6 +180,9 @@ void rslog(const RsLog::logLvl lvl, RsLog::logInfo *info, const std::string &msg fprintf(ofd, "(%s Z: %s, lvl: %u): %s \n", timestr2.c_str(), info->name.c_str(), (unsigned int)info->lvl, msg.c_str()); fflush(ofd); + + fprintf(stdout, "(%s Z: %s, lvl: %u): %s \n", + timestr2.c_str(), info->name.c_str(), (unsigned int)info->lvl, msg.c_str()); lineCount++; } }