Changeset 7854 in ntrip for trunk


Ignore:
Timestamp:
Apr 7, 2016, 9:46:49 AM (3 years ago)
Author:
stuerze
Message:

minor changes to allow a clean end of program

Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bnccaster.cpp

    r7681 r7854  
    130130  while(it.hasNext()){
    131131    bncGetThread* thread = it.next();
     132    disconnect(thread, 0, 0, 0);
     133    _staIDs.removeAll(thread->staID());
     134    _threads.removeAll(thread);
    132135    thread->terminate();
    133136  }
  • trunk/BNC/src/bncgetthread.cpp

    r7753 r7854  
    397397void bncGetThread::terminate() {
    398398  _isToBeDeleted = true;
    399   if (!isRunning()) {
    400     delete this;
    401   }
    402   _nmeaPortsMap.remove(_staID);
    403   delete _nmeaServer;
    404   delete _nmeaSockets;
     399
     400  if(_nmeaPortsMap.contains(_staID)) {
     401    _nmeaPortsMap.remove(_staID);
     402  }
     403  if (_nmeaServer) {
     404    delete _nmeaServer;
     405  }
     406  if (_nmeaSockets) {
     407    delete _nmeaSockets;
     408  }
     409  delete this;
    405410}
    406411
  • trunk/BNC/src/bncmain.cpp

    r7841 r7854  
    5757using namespace std;
    5858
     59
    5960void catch_signal(int) {
    6061  cout << "Program Interrupted by Ctrl-C" << endl;
    61   exit(0);
     62  qApp->quit();
    6263}
    6364
     
    497498    delete bncWin;
    498499  }
     500  else {
     501    BNC_CORE->stopPPP();
     502    BNC_CORE->stopCombination();
     503  }
    499504  if (caster) {
    500     delete caster;
     505    delete caster; caster = 0; BNC_CORE->setCaster(0);
    501506  }
    502507  if (casterEph) {
    503     delete casterEph;
     508    delete casterEph; casterEph = 0;
    504509  }
    505510  if (rawFile) {
Note: See TracChangeset for help on using the changeset viewer.