- Timestamp:
- Apr 8, 2008, 3:31:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bns.cpp
r791 r792 174 174 // ------------ 175 175 while (true) { 176 if (_clkSocket) { 177 if (_clkSocket->state() != QAbstractSocket::ConnectedState) { 178 delete _clkSocket; 179 _clkSocket = 0; 180 continue; 181 } 176 if (_clkSocket && _clkSocket->state() == QAbstractSocket::ConnectedState) { 182 177 if (!_clkSocket->canReadLine()) { 183 178 _clkSocket->waitForReadyRead(10); … … 197 192 void t_bns::readEpoch() { 198 193 199 if (_clkSocket->state() != QAbstractSocket::ConnectedState) {200 return;201 }202 203 194 QByteArray line = _clkSocket->readLine(); 204 195 … … 218 209 219 210 for (int ii = 1; ii <= numSat; ii++) { 220 if (_clkSocket->state() != QAbstractSocket::ConnectedState) { 221 return; 222 } 223 else { 224 if (!_clkSocket->canReadLine()) { 225 _clkSocket->waitForReadyRead(10); 226 } 227 line = _clkSocket->readLine(); 228 } 211 if (!_clkSocket->canReadLine()) { 212 _clkSocket->waitForReadyRead(10); 213 } 214 line = _clkSocket->readLine(); 229 215 230 216 cout << line.data();
Note:
See TracChangeset
for help on using the changeset viewer.