Changeset 1525 in ntrip


Ignore:
Timestamp:
Jan 21, 2009, 12:53:54 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnccaster.cpp

    r1523 r1525  
    117117  while(it.hasNext()){
    118118    bncGetThread* thread = it.next();
    119     ////    thread->quit();
    120     thread->deleteLater();
     119    thread->terminate();
    121120  }
    122121  delete _out;
     
    435434      _threads.removeAll(thread);
    436435      thread->terminate();
    437       delete thread;
    438436    }
    439437  }
  • trunk/BNC/bncgetthread.cpp

    r1472 r1525  
    8585  if (!_rnx) {
    8686    cerr << "no RINEX path specified" << endl;
    87     ::exit(0);
     87    delete this;
    8888  }
    8989}
     
    121121               app, SLOT(slotMessage(const QByteArray,bool)));
    122122
     123  _isToBeDeleted = false;
    123124  _decoder    = 0;
    124125  _query      = 0;
     
    292293////////////////////////////////////////////////////////////////////////////
    293294bncGetThread::~bncGetThread() {
    294   if (_query) {
    295     _query->deleteLater();
    296   }
     295  delete _query;
    297296  delete _decoder;
    298297  delete _rnx;
     
    305304////////////////////////////////////////////////////////////////////////////
    306305void bncGetThread::terminate() {
    307   if (_query) {
    308     _query->stop();
    309   }
    310   QThread::terminate();
    311   wait(2000);
     306  _isToBeDeleted = true;
    312307}
    313308
     
    365360      if (_rawInpFile) {
    366361        cerr << "Uknown data format" << endl;
    367         ::exit(0);
     362        delete this;
    368363      }
    369364      else {
     
    407402
    408403  if      (irc == fatal) {
    409     QThread::exit(1);
     404    this->deleteLater();
    410405    return;
    411406  }
     
    797792}
    798793
    799 // Exit
    800 ////////////////////////////////////////////////////////////////////////////
    801 void bncGetThread::exit(int exitCode) {
    802   if (exitCode!= 0) {
    803     emit error(_staID);
    804   }
    805   QThread::exit(exitCode);
    806   terminate();
    807 }
    808 
    809794// Try Re-Connect
    810795////////////////////////////////////////////////////////////////////////////
  • trunk/BNC/bncgetthread.h

    r1423 r1525  
    5151                const QByteArray& ntripVersion, int iMount);
    5252
     53 protected:
    5354   ~bncGetThread();
    5455
     56 public:
    5557   void terminate();
    5658
     
    7880   t_irc initRun();
    7981   void  message(const QString&);
    80    void  exit(int exitCode = 0);
    8182   void  tryReconnect();
    8283   void  callScript(const char* _comment);
     
    123124   QFile*      _rawInpFile;
    124125   QextSerialPort* _serialPort;
     126   bool        _isToBeDeleted;
    125127};
    126128
Note: See TracChangeset for help on using the changeset viewer.