Changeset 791 in ntrip for trunk


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

* empty log message *

Location:
trunk/BNS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r790 r791  
    197197void t_bns::readEpoch() {
    198198
     199  if (_clkSocket->state() != QAbstractSocket::ConnectedState) {
     200    return;
     201  }
     202
    199203  QByteArray line = _clkSocket->readLine();
    200204
     
    214218
    215219  for (int ii = 1; ii <= numSat; ii++) {
    216     if (!_clkSocket->canReadLine()) {
    217       _clkSocket->waitForReadyRead(10);
    218     }
    219     line = _clkSocket->readLine();
    220   cout << line.data();
     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    }
     229
     230    cout << line.data();
     231
    221232    QTextStream in(line);
    222233
  • trunk/BNS/bnseph.cpp

    r783 r791  
    8383
    8484    if (!_socket->canReadLine()) {
    85       _socket->waitForReadyRead();
     85      _socket->waitForReadyRead(10);
    8686    }
    8787
Note: See TracChangeset for help on using the changeset viewer.