Changeset 84 for trunk/src/control/controlconnection.cpp
- Timestamp:
- 01/13/06 23:32:35 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/control/controlconnection.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/control/controlconnection.cpp
r61 r84 57 57 { 58 58 disconnectFromHost(); 59 if (!waitForDisconnected(-1)) { 60 if (errmsg) { 61 *errmsg = 62 QString("Error disconnecting socket. [%1]").arg(errorString()); 59 if (state() != QAbstractSocket::UnconnectedState) { 60 if (!waitForDisconnected(-1)) { 61 if (errmsg) { 62 *errmsg = 63 QString("Error disconnecting socket. [%1]").arg(errorString()); 64 } 65 return false; 63 66 } 64 return false;65 67 } 66 68 return true; … … 77 79 ControlConnection::sendCommand(ControlCommand cmd, QString *errmsg) 78 80 { 81 if (!isValid()) { 82 return false; 83 } 84 79 85 /* Format the control command */ 80 86 QString strCmd = cmd.toString(); … … 109 115 QChar c; 110 116 QString line; 117 118 if (!isValid()) { 119 return false; 120 } 111 121 112 122 /* The implementation below is based on the Java control library from Tor */
