fixed bootstrapping of Tor in retroshare-service

This commit is contained in:
csoler 2021-07-02 00:11:10 +02:00
parent da86da29ff
commit ae79261cbc
2 changed files with 10 additions and 0 deletions

View File

@ -35,6 +35,8 @@
# include <QString> // for QString::fromStdString(...)
#endif
#include <QCoreApplication>
#include "util/argstream.h"
#include "util/rsdebug.h"
#include "util/rsdir.h"
@ -1960,6 +1962,9 @@ bool RsInit::startAutoTor()
std::cerr << "(EE) Tor hidden service cannot be started: " << error_msg << std::endl;
return false;
}
// process Qt event loop to deal with messages of online/offline info
QCoreApplication::processEvents();
}
return true;
}

View File

@ -357,6 +357,11 @@ bool TorManager::start()
emit configurationNeededChanged();
}
std::cerr << "Starting Tor process:" << std::endl;
std::cerr << " Tor executable path: " << executable.toStdString() << std::endl;
std::cerr << " Tor data directory : " << d->dataDir.toStdString() << std::endl;
std::cerr << " Tor default torrc : " << defaultTorrc.toStdString() << std::endl;
d->process->setExecutable(executable);
d->process->setDataDir(d->dataDir);
d->process->setDefaultTorrc(defaultTorrc);