Changeset 2105 in ntrip for trunk/BNC/bncapp.cpp
- Timestamp:
- Dec 8, 2009, 10:49:57 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncapp.cpp
r2011 r2105 639 639 QMutexLocker locker(&_mutex); 640 640 641 if (!_socketsCorr) {642 return;643 }644 645 641 bncSettings settings; 646 642 _waitCoTime = settings.value("corrTime").toInt(); … … 683 679 QList<QString> allCorrs = _corrs->values(sec); 684 680 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) { 694 696 delete sock; 695 697 is.remove(); 696 698 } 697 }698 else if (sock->state() != QAbstractSocket::ConnectingState) {699 delete sock;700 is.remove();701 699 } 702 700 }
Note:
See TracChangeset
for help on using the changeset viewer.