Changeset 836 in ntrip


Ignore:
Timestamp:
Apr 16, 2008, 12:09:18 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r835 r836  
    2929  this->setTerminationEnabled(true);
    3030 
     31  connect(this, SIGNAL(moveSocket(QThread*)),
     32          this, SLOT(slotMoveSocket(QThread*)));
     33
    3134  // Thread that handles broadcast ephemeris
    3235  // ---------------------------------------
     
    220223  // ------------
    221224  while (true) {
     225
     226    if (_clkSocket && _clkSocket->thread() != currentThread()) {
     227      emit(moveSocket(currentThread()));
     228    }
     229
    222230    if (_clkSocket && _clkSocket->state() == QAbstractSocket::ConnectedState) {
    223231      if ( _clkSocket->canReadLine()) {
     
    311319  }
    312320}
     321
     322//
     323////////////////////////////////////////////////////////////////////////////
     324void t_bns::slotMoveSocket(QThread* tt) {
     325  _clkSocket->setParent(0);
     326  _clkSocket->moveToThread(tt);
     327  slotMessage("bns::slotMoveSocket");
     328}
  • trunk/BNS/bns.h

    r816 r836  
    3535  void newMessage(const QByteArray msg);
    3636  void error(const QByteArray msg);
     37  void moveSocket(QThread* tt);
    3738 
    3839 private slots:
     
    4142  void slotMessage(const QByteArray msg);
    4243  void slotError(const QByteArray msg);
     44  void slotMoveSocket(QThread* tt);
    4345
    4446 private:
  • trunk/BNS/bns.pro

    r817 r836  
    22# Switch to debug configuration
    33# -----------------------------
    4 ### CONFIG -= release
    5 ### CONFIG += debug
     4CONFIG -= release
     5CONFIG += debug
    66
    77RESOURCES += bns.qrc
Note: See TracChangeset for help on using the changeset viewer.