Changeset 46:e57735492bf8 in xplra for src


Ignore:
Timestamp:
02/16/13 09:16:54 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Fixed the shutdown sequence and removed some unnecessary printouts

Location:
src/plugin/src/xplra
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/plugin/src/xplra/HotkeyHandler.cc

    r45 r46  
    7575{
    7676    for(size_t i = 0; i<numHotkeys; ++i) {
    77         Util::debug("handleKey: %04x\n", hotkeys[i]);
    78 
    7977        if (hotkeys[i]==code) {
    8078            pressed[i] = 1;
     
    144142    if ( (flags&xplm_ControlFlag)!=0 ) code |= Protocol::HOTKEY_MODIFIER_CONTROL;
    145143
    146     Util::debug("code=0x%04x\n", code);
    147 
    148144    bool handled = false;
    149145
  • src/plugin/src/xplra/ListenThread.h

    r44 r46  
    105105
    106106inline ListenThread::ListenThread(Globals& globals) :
    107     Thread(true),
    108107    globals(globals),
    109108    quitEvent(&waiter)
  • src/plugin/src/xplra/MessageWindow.cc

    r42 r46  
    8383    int screenHeight = XPLMGetDatai(heightDataRef);
    8484
    85     Util::debug("hu.varadiistvan.xplra.MessageWindow: screenWidth=%d, screenHeight=%d\n",
    86                 screenWidth, screenHeight);
     85    // Util::debug("hu.varadiistvan.xplra.MessageWindow: screenWidth=%d, screenHeight=%d\n",
     86    //             screenWidth, screenHeight);
    8787
    8888    left = 50; right = screenWidth - left;
  • src/plugin/src/xplra/ServerThread.cc

    r45 r46  
    6969    instancesMutex.lock();
    7070    for(instances_t::iterator i = instances.begin(); i!=instances.end(); ++i) {
    71         (*i)->quit();
    72     }
     71        ServerThread* thread = *i;
     72        thread->quit();
     73        thread->join();
     74        delete thread;
     75    }
     76    instances.clear();
    7377    instancesMutex.unlock();
    7478}
     
    9195ServerThread::ServerThread(ListenThread& listenThread,
    9296                           RequestQueue& requestQueue, LocalAcceptor& acceptor) :
    93     Thread(true),
    9497    listenThread(listenThread),
    9598    requestQueue(requestQueue),
     
    122125        delete i->second;
    123126    }
    124 
    125     instancesMutex.lock();
    126     instances.erase(this);
    127     instancesMutex.unlock();
    128127}
    129128
  • src/plugin/src/xplra/plugin.cc

    r44 r46  
    116116    if (listenThread!=0) {
    117117        listenThread->quit();
     118        listenThread->join();
     119        delete listenThread;
    118120        listenThread = 0;
    119121    }
Note: See TracChangeset for help on using the changeset viewer.