Loading src/torcontrol/TorControl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -1127,3 +1127,10 @@ TorControl::ipToCountry(const QHostAddress &ip, QString *errmsg) return QString(); } /** Takes ownership of the tor process it's communicating to */ bool TorControl::takeOwnership(QString *errmsg) { ControlCommand cmd("TAKEOWNERSHIP"); return send(cmd, errmsg); } src/torcontrol/TorControl.h +3 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,9 @@ public: * it's not NULL. */ QString ipToCountry(const QHostAddress &ip, QString *errmsg = 0); /** Takes ownership of the tor process it's communicating to */ bool takeOwnership(QString *errmsg); public slots: /** Closes the circuit specified by <b>circId</b>. If <b>ifUnused</b> is * true, then the circuit will not be closed unless it is unused. */ Loading src/vidalia/MainWindow.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -1083,6 +1083,8 @@ MainWindow::start() args << "ControlSocket" << path; } args << "__OwningControllerProcess" << QString::number(QCoreApplication::applicationPid()); /* Add the control port authentication arguments */ switch (settings.getAuthenticationMethod()) { case TorSettings::PasswordAuth: Loading Loading @@ -1346,6 +1348,11 @@ void MainWindow::connected() { authenticate(); if(!_torControl->isVidaliaRunningTor()) { QString err; if(!_torControl->takeOwnership(&err)) vWarn(err); } } /** Called when Vidalia wants to disconnect from a Tor it did not start. */ Loading Loading
src/torcontrol/TorControl.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -1127,3 +1127,10 @@ TorControl::ipToCountry(const QHostAddress &ip, QString *errmsg) return QString(); } /** Takes ownership of the tor process it's communicating to */ bool TorControl::takeOwnership(QString *errmsg) { ControlCommand cmd("TAKEOWNERSHIP"); return send(cmd, errmsg); }
src/torcontrol/TorControl.h +3 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,9 @@ public: * it's not NULL. */ QString ipToCountry(const QHostAddress &ip, QString *errmsg = 0); /** Takes ownership of the tor process it's communicating to */ bool takeOwnership(QString *errmsg); public slots: /** Closes the circuit specified by <b>circId</b>. If <b>ifUnused</b> is * true, then the circuit will not be closed unless it is unused. */ Loading
src/vidalia/MainWindow.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -1083,6 +1083,8 @@ MainWindow::start() args << "ControlSocket" << path; } args << "__OwningControllerProcess" << QString::number(QCoreApplication::applicationPid()); /* Add the control port authentication arguments */ switch (settings.getAuthenticationMethod()) { case TorSettings::PasswordAuth: Loading Loading @@ -1346,6 +1348,11 @@ void MainWindow::connected() { authenticate(); if(!_torControl->isVidaliaRunningTor()) { QString err; if(!_torControl->takeOwnership(&err)) vWarn(err); } } /** Called when Vidalia wants to disconnect from a Tor it did not start. */ Loading