Changeset 6451 in ntrip for trunk/BNC/src/bnccore.cpp
- Timestamp:
- Dec 26, 2014, 5:58:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r6444 r6451 91 91 _ephStreamSBAS = 0; 92 92 93 _port = 0;94 _server = 0;95 _sockets = 0;93 _portEph = 0; 94 _serverEph = 0; 95 _socketsEph = 0; 96 96 97 97 _portCorr = 0; … … 128 128 delete _ephStreamGPS; 129 129 delete _ephFileGPS; 130 delete _server ;131 delete _sockets ;130 delete _serverEph; 131 delete _socketsEph; 132 132 delete _serverCorr; 133 133 delete _socketsCorr; … … 437 437 QString strV3 = eph.toString(t_rnxObsHeader::defaultRnxObsVersion3); 438 438 439 printOutput (printFile, _ephStreamGlonass, strV2, strV3);439 printOutputEph(printFile, _ephStreamGlonass, strV2, strV3); 440 440 } 441 441 442 442 // Output 443 443 //////////////////////////////////////////////////////////////////////////// 444 void t_bncCore::printOutput (bool printFile, QTextStream* stream,445 const QString& strV2, const QString& strV3) {444 void t_bncCore::printOutputEph(bool printFile, QTextStream* stream, 445 const QString& strV2, const QString& strV3) { 446 446 447 447 // Output into file … … 459 459 // Output into the socket 460 460 // ---------------------- 461 if (_sockets ) {462 QMutableListIterator<QTcpSocket*> is(*_sockets );461 if (_socketsEph) { 462 QMutableListIterator<QTcpSocket*> is(*_socketsEph); 463 463 while (is.hasNext()) { 464 464 QTcpSocket* sock = is.next(); … … 479 479 // Set Port Number 480 480 //////////////////////////////////////////////////////////////////////////// 481 void t_bncCore::setPort (int port) {482 _port = port;483 if (_port != 0) {484 delete _server ;485 _server = new QTcpServer;486 if ( !_server ->listen(QHostAddress::Any, _port) ) {481 void t_bncCore::setPortEph(int port) { 482 _portEph = port; 483 if (_portEph != 0) { 484 delete _serverEph; 485 _serverEph = new QTcpServer; 486 if ( !_serverEph->listen(QHostAddress::Any, _portEph) ) { 487 487 slotMessage("t_bncCore: Cannot listen on ephemeris port", true); 488 488 } 489 connect(_server , SIGNAL(newConnection()), this, SLOT(slotNewConnection()));490 delete _sockets ;491 _sockets = new QList<QTcpSocket*>;489 connect(_serverEph, SIGNAL(newConnection()), this, SLOT(slotNewConnectionEph())); 490 delete _socketsEph; 491 _socketsEph = new QList<QTcpSocket*>; 492 492 } 493 493 } … … 511 511 // New Connection 512 512 //////////////////////////////////////////////////////////////////////////// 513 void t_bncCore::slotNewConnection () {514 _sockets ->push_back( _server->nextPendingConnection() );513 void t_bncCore::slotNewConnectionEph() { 514 _socketsEph->push_back( _serverEph->nextPendingConnection() ); 515 515 } 516 516
Note:
See TracChangeset
for help on using the changeset viewer.