Changeset 6455 in ntrip for trunk/BNC/src/bnccore.cpp
- Timestamp:
- Dec 27, 2014, 3:58:55 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r6451 r6455 534 534 emit newOrbCorrections(orbCorrections); 535 535 if (_socketsCorr) { 536 QListIterator<t_orbCorr> it(orbCorrections); 537 while (it.hasNext()) { 538 const t_orbCorr& corr = it.next(); 539 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 540 while (is.hasNext()) { 541 QTcpSocket* sock = is.next(); 542 if (sock->state() == QAbstractSocket::ConnectedState) { 543 if (sock->write(corr.toLine().c_str()) == -1) { 544 delete sock; 545 is.remove(); 546 } 547 } 548 else if (sock->state() != QAbstractSocket::ConnectingState) { 536 ostringstream out; 537 t_orbCorr::writeEpoch(&out, orbCorrections); 538 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 539 while (is.hasNext()) { 540 QTcpSocket* sock = is.next(); 541 if (sock->state() == QAbstractSocket::ConnectedState) { 542 if (sock->write(out.str().c_str()) == -1) { 549 543 delete sock; 550 544 is.remove(); 551 545 } 546 } 547 else if (sock->state() != QAbstractSocket::ConnectingState) { 548 delete sock; 549 is.remove(); 552 550 } 553 551 } … … 561 559 emit newClkCorrections(clkCorrections); 562 560 if (_socketsCorr) { 563 QListIterator<t_clkCorr> it(clkCorrections); 564 while (it.hasNext()) { 565 const t_clkCorr& corr = it.next(); 566 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 567 while (is.hasNext()) { 568 QTcpSocket* sock = is.next(); 569 if (sock->state() == QAbstractSocket::ConnectedState) { 570 if (sock->write(corr.toLine().c_str()) == -1) { 571 delete sock; 572 is.remove(); 573 } 574 } 575 else if (sock->state() != QAbstractSocket::ConnectingState) { 561 ostringstream out; 562 t_clkCorr::writeEpoch(&out, clkCorrections); 563 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 564 while (is.hasNext()) { 565 QTcpSocket* sock = is.next(); 566 if (sock->state() == QAbstractSocket::ConnectedState) { 567 if (sock->write(out.str().c_str()) == -1) { 576 568 delete sock; 577 569 is.remove(); 578 570 } 571 } 572 else if (sock->state() != QAbstractSocket::ConnectingState) { 573 delete sock; 574 is.remove(); 579 575 } 580 576 }
Note:
See TracChangeset
for help on using the changeset viewer.