Changeset 621 in ntrip for trunk/BNC/bncmain.cpp


Ignore:
Timestamp:
Dec 16, 2007, 3:44:57 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmain.cpp

    r606 r621  
    5050using namespace std;
    5151
    52 bncCaster* _caster = 0;
    53 
    5452void catch_signal(int) {
    55   delete _caster;
    5653  cout << "Program Interrupted by Ctrl-C" << endl;
    57   ((bncApp*)qApp)->quit();
     54  ((bncApp*)qApp)->slotQuit();
    5855}
    5956
     
    109106  // ----------------------------
    110107  else {
     108
     109    bncCaster* caster = new bncCaster(settings.value("outFile").toString(),
     110                                      settings.value("outPort").toInt());
     111   
     112    app.setCaster(caster);
     113
    111114    // Ctrl-C Signal Handling
    112115    // ----------------------
    113116    signal(SIGINT, catch_signal);
    114117
    115     _caster = new bncCaster(settings.value("outFile").toString(),
    116                             settings.value("outPort").toInt());
    117    
     118    //// beg test
     119    QTimer::singleShot(30000, &app, SLOT(slotQuit()));
     120    //// end test
     121
    118122    app.setPort(settings.value("outEphPort").toInt());
    119123
    120     app.connect(_caster, SIGNAL(getThreadErrors()), &app, SLOT(quit()));
    121     app.connect(_caster, SIGNAL(newMessage(const QByteArray&)),
     124    app.connect(caster, SIGNAL(getThreadErrors()), &app, SLOT(quit()));
     125    app.connect(caster, SIGNAL(newMessage(const QByteArray&)),
    122126                &app, SLOT(slotMessage(const QByteArray&)));
    123127 
     
    139143                  &app, SLOT(slotMessage(const QByteArray&)));
    140144
    141       _caster->addGetThread(getThread);
     145      caster->addGetThread(getThread);
    142146
    143147      getThread->start();
    144148    }
    145     if (_caster->numStations() == 0) {
     149    if (caster->numStations() == 0) {
    146150      return 0;
    147151    }
Note: See TracChangeset for help on using the changeset viewer.