Changeset 1525 in ntrip
- Timestamp:
- Jan 21, 2009, 12:53:54 PM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnccaster.cpp
r1523 r1525 117 117 while(it.hasNext()){ 118 118 bncGetThread* thread = it.next(); 119 //// thread->quit(); 120 thread->deleteLater(); 119 thread->terminate(); 121 120 } 122 121 delete _out; … … 435 434 _threads.removeAll(thread); 436 435 thread->terminate(); 437 delete thread;438 436 } 439 437 } -
trunk/BNC/bncgetthread.cpp
r1472 r1525 85 85 if (!_rnx) { 86 86 cerr << "no RINEX path specified" << endl; 87 ::exit(0);87 delete this; 88 88 } 89 89 } … … 121 121 app, SLOT(slotMessage(const QByteArray,bool))); 122 122 123 _isToBeDeleted = false; 123 124 _decoder = 0; 124 125 _query = 0; … … 292 293 //////////////////////////////////////////////////////////////////////////// 293 294 bncGetThread::~bncGetThread() { 294 if (_query) { 295 _query->deleteLater(); 296 } 295 delete _query; 297 296 delete _decoder; 298 297 delete _rnx; … … 305 304 //////////////////////////////////////////////////////////////////////////// 306 305 void bncGetThread::terminate() { 307 if (_query) { 308 _query->stop(); 309 } 310 QThread::terminate(); 311 wait(2000); 306 _isToBeDeleted = true; 312 307 } 313 308 … … 365 360 if (_rawInpFile) { 366 361 cerr << "Uknown data format" << endl; 367 ::exit(0);362 delete this; 368 363 } 369 364 else { … … 407 402 408 403 if (irc == fatal) { 409 QThread::exit(1);404 this->deleteLater(); 410 405 return; 411 406 } … … 797 792 } 798 793 799 // Exit800 ////////////////////////////////////////////////////////////////////////////801 void bncGetThread::exit(int exitCode) {802 if (exitCode!= 0) {803 emit error(_staID);804 }805 QThread::exit(exitCode);806 terminate();807 }808 809 794 // Try Re-Connect 810 795 //////////////////////////////////////////////////////////////////////////// -
trunk/BNC/bncgetthread.h
r1423 r1525 51 51 const QByteArray& ntripVersion, int iMount); 52 52 53 protected: 53 54 ~bncGetThread(); 54 55 56 public: 55 57 void terminate(); 56 58 … … 78 80 t_irc initRun(); 79 81 void message(const QString&); 80 void exit(int exitCode = 0);81 82 void tryReconnect(); 82 83 void callScript(const char* _comment); … … 123 124 QFile* _rawInpFile; 124 125 QextSerialPort* _serialPort; 126 bool _isToBeDeleted; 125 127 }; 126 128
Note:
See TracChangeset
for help on using the changeset viewer.