Changeset 792 in ntrip for trunk/BNS


Ignore:
Timestamp:
Apr 8, 2008, 3:31:48 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r791 r792  
    174174  // ------------
    175175  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) {
    182177      if (!_clkSocket->canReadLine()) {
    183178        _clkSocket->waitForReadyRead(10);
     
    197192void t_bns::readEpoch() {
    198193
    199   if (_clkSocket->state() != QAbstractSocket::ConnectedState) {
    200     return;
    201   }
    202 
    203194  QByteArray line = _clkSocket->readLine();
    204195
     
    218209
    219210  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();
    229215
    230216    cout << line.data();
Note: See TracChangeset for help on using the changeset viewer.