Changeset 2105 in ntrip for trunk/BNC


Ignore:
Timestamp:
Dec 8, 2009, 10:49:57 AM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncapp.cpp

    r2011 r2105  
    639639  QMutexLocker locker(&_mutex);
    640640
    641   if (!_socketsCorr) {
    642     return;
    643   }
    644 
    645641  bncSettings settings;
    646642  _waitCoTime    = settings.value("corrTime").toInt();
     
    683679    QList<QString> allCorrs = _corrs->values(sec);
    684680    emit newCorrections(allCorrs);
    685     QListIterator<QString> it(allCorrs);
    686     while (it.hasNext()) {
    687       QString corrLine = it.next() + "\n";
    688 
    689       QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
    690       while (is.hasNext()) {
    691         QTcpSocket* sock = is.next();
    692         if (sock->state() == QAbstractSocket::ConnectedState) {
    693           if (sock->write(corrLine.toAscii()) == -1) {
     681    if (_socketsCorr) {
     682      QListIterator<QString> it(allCorrs);
     683      while (it.hasNext()) {
     684        QString corrLine = it.next() + "\n";
     685     
     686        QMutableListIterator<QTcpSocket*> is(*_socketsCorr);
     687        while (is.hasNext()) {
     688          QTcpSocket* sock = is.next();
     689          if (sock->state() == QAbstractSocket::ConnectedState) {
     690            if (sock->write(corrLine.toAscii()) == -1) {
     691              delete sock;
     692              is.remove();
     693            }
     694          }
     695          else if (sock->state() != QAbstractSocket::ConnectingState) {
    694696            delete sock;
    695697            is.remove();
    696698          }
    697         }
    698         else if (sock->state() != QAbstractSocket::ConnectingState) {
    699           delete sock;
    700           is.remove();
    701699        }
    702700      }
  • trunk/BNC/bncwindow.cpp

    r2103 r2105  
    569569    _corrIntrComboBox->setEnabled(false);
    570570  }
    571   if (_corrPortLineEdit->text().isEmpty()) {
    572     _corrTimeSpinBox->setStyleSheet("background-color: lightGray");
    573     _corrTimeSpinBox->setEnabled(false);
    574   }
    575571
    576572  // Feed Engine
     
    14961492      _corrPortLineEdit->setEnabled(true);
    14971493      }
    1498       if (!_corrPortLineEdit->text().isEmpty()) {
    1499       _corrTimeSpinBox->setStyleSheet("background-color: white");
    1500       _corrTimeSpinBox->setEnabled(true);
    1501       }
    15021494    } else {
    15031495      if (_corrPathLineEdit->text().isEmpty()) {
    15041496      _corrIntrComboBox->setStyleSheet("background-color: lightGray");
    15051497      _corrIntrComboBox->setEnabled(false);
    1506       }
    1507       if (_corrPortLineEdit->text().isEmpty()) {
    1508       _corrTimeSpinBox->setStyleSheet("background-color: lightGray");
    1509       _corrTimeSpinBox->setEnabled(false);
    15101498      }
    15111499    }
Note: See TracChangeset for help on using the changeset viewer.