mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 21:40:36 -04:00
proper error handlign when Tor is not available
This commit is contained in:
parent
8f7582588a
commit
faf45174c7
3 changed files with 21 additions and 3 deletions
|
@ -367,12 +367,19 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||
|
||||
{
|
||||
TorControlDialog tcd(torManager) ;
|
||||
QString error_msg ;
|
||||
tcd.show();
|
||||
|
||||
while(tcd.checkForTor() != TorControlDialog::TOR_STATUS_OK || tcd.checkForHiddenService() != TorControlDialog::HIDDEN_SERVICE_STATUS_OK) // runs until some status is reached: either tor works, or it fails.
|
||||
while(tcd.checkForTor(error_msg) != TorControlDialog::TOR_STATUS_OK || tcd.checkForHiddenService() != TorControlDialog::HIDDEN_SERVICE_STATUS_OK) // runs until some status is reached: either tor works, or it fails.
|
||||
{
|
||||
QCoreApplication::processEvents();
|
||||
rstime::rs_usleep(0.2*1000*1000) ;
|
||||
|
||||
if(!error_msg.isNull())
|
||||
{
|
||||
QMessageBox::critical(NULL,QObject::tr("Cannot start Tor"),QObject::tr("Sorry but Tor cannot be started on your system!\n\nThe error reported is:\"")+error_msg+"\"") ;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
tcd.hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue