[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1231: Fix arma's signal conflict bug (Ticket #160), by splitting t (in trunk/src/util: . geoip)
Author: edmanm
Date: 2006-09-23 00:30:16 -0400 (Sat, 23 Sep 2006)
New Revision: 1231
Modified:
trunk/src/util/geoip/geoipresolver.cpp
trunk/src/util/torsocket.cpp
trunk/src/util/torsocket.h
Log:
Fix arma's signal conflict bug (Ticket #160), by splitting the
TorSocket::connected() signal into connectedToTor() and connectedToHost() so
as not to conflict with QAbstractSocket::connected().
Modified: trunk/src/util/geoip/geoipresolver.cpp
===================================================================
--- trunk/src/util/geoip/geoipresolver.cpp 2006-09-23 03:29:17 UTC (rev 1230)
+++ trunk/src/util/geoip/geoipresolver.cpp 2006-09-23 04:30:16 UTC (rev 1231)
@@ -159,7 +159,7 @@
GeoIpResolver::createRequestSocket()
{
TorSocket *socket = new TorSocket(QHostAddress::LocalHost, 9050);
- connect(socket, SIGNAL(connected()), this, SLOT(connected()),
+ connect(socket, SIGNAL(connectedToHost()), this, SLOT(connected()),
Qt::QueuedConnection);
connect(socket, SIGNAL(socketError(QString)),
this, SLOT(socketError(QString)),
Modified: trunk/src/util/torsocket.cpp
===================================================================
--- trunk/src/util/torsocket.cpp 2006-09-23 03:29:17 UTC (rev 1230)
+++ trunk/src/util/torsocket.cpp 2006-09-23 04:30:16 UTC (rev 1231)
@@ -56,6 +56,9 @@
/* Wait for the local connection. */
if (waitForConnected(LOCAL_CONNECT_TIMEOUT)) {
+ /* Signal that we connected to Tor. */
+ emit connectedToTor();
+
/* We're connected to the proxy, so send our part of the handshake. */
QObject::connect(this, SIGNAL(readyRead()),
this, SLOT(onHandshakeResponse()));
@@ -120,7 +123,7 @@
if ((uchar)response[0] == (uchar)SOCKS_RESPONSE_VERSION &&
(uchar)response[1] == (uchar)SOCKS_CONNECT_STATUS_OK) {
/* Connection status was okay. */
- emit connected();
+ emit connectedToHost();
} else {
/* Remote connection failed, so close the connection to the proxy. */
disconnectFromHost();
Modified: trunk/src/util/torsocket.h
===================================================================
--- trunk/src/util/torsocket.h 2006-09-23 03:29:17 UTC (rev 1230)
+++ trunk/src/util/torsocket.h 2006-09-23 04:30:16 UTC (rev 1231)
@@ -43,8 +43,11 @@
void connectToHost(const QString &remoteHost, quint16 remotePort);
signals:
- /** Emitted when a connection has been established to a remote host via Tor. */
- void connected();
+ /** Emitted when a connection has been established to Tor. */
+ void connectedToTor();
+ /** Emitted when a connection has been established through Tor to the remote
+ * host specified in a prior call to connectToHost(). */
+ void connectedToHost();
/** Emmitted when a connection error has occurred. */
void socketError(QString errmsg);