mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-23 22:01:05 -05:00
fixed a few bugs
This commit is contained in:
parent
bdbcadc43c
commit
f352235ccd
@ -38,7 +38,7 @@
|
||||
using namespace Tor;
|
||||
|
||||
AddOnionCommand::AddOnionCommand(HiddenService *service)
|
||||
: m_service(service)
|
||||
: m_service(service), mSucceeded([](){}), mFailed([](int){})
|
||||
{
|
||||
assert(m_service);
|
||||
}
|
||||
|
@ -487,7 +487,7 @@ void TorControl::getTorInfo()
|
||||
void TorControl::getTorInfoReply(TorControlCommand *sender)
|
||||
{
|
||||
GetConfCommand *command = dynamic_cast<GetConfCommand*>(sender);
|
||||
if (!command || !isConnected())
|
||||
if (!command)// || !isConnected())
|
||||
return;
|
||||
|
||||
std::list<ByteArray> listenAddresses = splitQuotedStrings(command->get("net/listeners/socks").front(), ' ');
|
||||
|
@ -97,7 +97,7 @@ public:
|
||||
void setAuthPassword(const ByteArray& password);
|
||||
|
||||
/* Connection */
|
||||
bool isConnected() const { return status() == Authenticated; }
|
||||
bool isConnected() const { return status() >= Authenticated; }
|
||||
void connect(const std::string &address, uint16_t port);
|
||||
void authenticate();
|
||||
|
||||
|
@ -59,15 +59,7 @@ void TorControlDialog::handleEvent_main_thread(std::shared_ptr<const RsEvent> ev
|
||||
if(!fe)
|
||||
return;
|
||||
|
||||
switch (fe->mTorManagerEventType)
|
||||
{
|
||||
case RsTorManagerEventCode::BOOTSTRAP_STATUS_CHANGED:
|
||||
case RsTorManagerEventCode::TOR_CONNECTIVITY_CHANGED:
|
||||
case RsTorManagerEventCode::TOR_STATUS_CHANGED: statusChanged(fe->mTorStatus,fe->mTorConnectivityStatus);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
statusChanged(fe->mTorStatus,fe->mTorConnectivityStatus);
|
||||
}
|
||||
|
||||
void TorControlDialog::onIncomingConnection()
|
||||
@ -112,7 +104,6 @@ void TorControlDialog::statusChanged(RsTorStatus torstatus, RsTorConnectivitySta
|
||||
|
||||
std::cerr << "Tor control status: " << tor_control_status_str.toStdString() << std::endl;
|
||||
std::cerr << "Tor status: " << torstatus_str.toStdString() << std::endl;
|
||||
|
||||
std::cerr << "Bootstrap status map: " << std::endl;
|
||||
|
||||
for(auto it(qvm.begin());it!=qvm.end();++it)
|
||||
|
@ -141,13 +141,13 @@ void TorStatus::getTorStatus()
|
||||
if(!_updated)
|
||||
{
|
||||
RsPeerDetails pd;
|
||||
uint32_t hiddentype;
|
||||
if (rsPeers->getPeerDetails(rsPeers->getOwnId(), pd)) {
|
||||
if(pd.netMode == RS_NETMODE_HIDDEN)
|
||||
uint32_t hiddentype = RS_HIDDEN_TYPE_UNKNOWN;
|
||||
|
||||
if (rsPeers->getPeerDetails(rsPeers->getOwnId(), pd))
|
||||
{
|
||||
if(pd.netMode == RS_NETMODE_HIDDEN)
|
||||
hiddentype = pd.hiddenType;
|
||||
}
|
||||
}
|
||||
std::string proxyaddr;
|
||||
uint16_t proxyport;
|
||||
uint32_t status ;
|
||||
|
Loading…
Reference in New Issue
Block a user