VirtualBox

Changeset 60513 in vbox for trunk/src


Ignore:
Timestamp:
Apr 15, 2016 8:56:44 AM (9 years ago)
Author:
vboxsync
Message:

webservice: simplify termination logic, unify between platforms, ATL cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/vboxweb.cpp

    r59655 r60513  
    66 *      server, to which clients can connect.
    77 *
    8  * Copyright (C) 2007-2015 Oracle Corporation
     8 * Copyright (C) 2007-2016 Oracle Corporation
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    964964#ifdef RT_OS_WINDOWS
    965965// Required for ATL
    966 static CComModule _Module;
     966static ATL::CComModule _Module;
    967967
    968968/**
     
    981981        case CTRL_LOGOFF_EVENT:
    982982        case CTRL_SHUTDOWN_EVENT:
     983        {
    983984            ASMAtomicWriteBool(&g_fKeepRunning, false);
     985            com::NativeEventQueue *pQ = com::NativeEventQueue::getMainEventQueue();
     986            pQ->interruptEventQueueProcessing();
    984987            fEventHandled = TRUE;
    985988            break;
     989        }
    986990        default:
    987991            break;
     
    990994}
    991995#else
    992 class ForceQuitEvent : public com::NativeEvent
    993 {
    994     void *handler()
    995     {
    996         LogFlowFunc(("\n"));
    997 
    998         ASMAtomicWriteBool(&g_fKeepRunning, false);
    999 
    1000         return NULL;
    1001     }
    1002 };
    1003 
    1004996/**
    1005997 * Signal handler for cleanly terminating the event loop.
     
    10081000{
    10091001    NOREF(iSignal);
     1002    ASMAtomicWriteBool(&g_fKeepRunning, false);
    10101003    com::NativeEventQueue *pQ = com::NativeEventQueue::getMainEventQueue();
    1011     pQ->postEvent(new ForceQuitEvent());
     1004    pQ->interruptEventQueueProcessing();
    10121005}
    10131006#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette