Browse Source

Merge pull request #1412 from nonlinear-chaos-order-etc/openssl

qt: disabled broken UPnP + small qt debugging tweaks
pull/1413/head
orignal 5 years ago committed by GitHub
parent
commit
a2b8d468bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      qt/i2pd_qt/.gitignore
  2. 12
      qt/i2pd_qt/DaemonQT.cpp
  3. 7
      qt/i2pd_qt/i2pd_qt.pro
  4. 2
      qt/i2pd_qt/logviewermanager.cpp

4
qt/i2pd_qt/.gitignore vendored

@ -6,4 +6,6 @@ i2pd_qt @@ -6,4 +6,6 @@ i2pd_qt
Makefile*
*.stash
object_script.*
i2pd_qt_plugin_import.cpp
i2pd_qt_plugin_import.cpp
i2pd_qt.pro.autosave*

12
qt/i2pd_qt/DaemonQT.cpp

@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
#include <QMutexLocker>
#include <QThread>
//#define DEBUG_WITH_DEFAULT_LOGGING (1)
namespace i2p
{
namespace qt
@ -151,10 +153,16 @@ namespace qt @@ -151,10 +153,16 @@ namespace qt
int result;
{
std::shared_ptr<std::iostream> logstreamptr=std::make_shared<std::stringstream>();
std::shared_ptr<std::iostream> logstreamptr=
#ifdef DEBUG_WITH_DEFAULT_LOGGING
nullptr
#else
std::make_shared<std::stringstream>()
#endif
;
//TODO move daemon init deinit to a bg thread
DaemonQTImpl daemon;
(*logstreamptr) << "Initialising the daemon..." << std::endl;
if(logstreamptr) (*logstreamptr) << "Initialising the daemon..." << std::endl;
bool daemonInitSuccess = daemon.init(argc, argv, logstreamptr);
if(!daemonInitSuccess)
{

7
qt/i2pd_qt/i2pd_qt.pro

@ -5,7 +5,12 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets @@ -5,7 +5,12 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = i2pd_qt
TEMPLATE = app
QMAKE_CXXFLAGS *= -std=c++11 -Wno-unused-parameter -Wno-maybe-uninitialized
DEFINES += USE_UPNP
# For now, disable UPnP which currently crashes on Stop() -- https://github.com/PurpleI2P/i2pd/issues/1387
#DEFINES += USE_UPNP
DEFINES -= USE_UPNP
debug: DEFINES += DEBUG_WITH_DEFAULT_LOGGING
SOURCES += DaemonQT.cpp mainwindow.cpp \
../../libi2pd/api.cpp \

2
qt/i2pd_qt/logviewermanager.cpp

@ -18,7 +18,7 @@ namespace logviewer { @@ -18,7 +18,7 @@ namespace logviewer {
QString Worker::pollAndShootATimerForInfiniteRetries() {
std::shared_ptr<std::iostream> logStream=logViewerManager.getLogStream();
assert(logStream!=nullptr);
if(!logStream)return "";
std::streamsize MAX_SZ=64*1024;
char*buf=(char*)malloc(MAX_SZ*sizeof(char));
if(buf==nullptr)return "";

Loading…
Cancel
Save