VirtualBox

Changeset 88821 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
May 3, 2021 10:45:45 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144155
Message:

VBoxSVC: Oops, g/c debug instrumentaion accidentally committed in
previous (r144113) and trim it back to the intended swap of two lines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/win/svcmain.cpp

    r88783 r88821  
    5757{
    5858public:
    59     LONG Lock();
    6059    LONG Unlock();
    6160    DWORD dwThreadID;
     
    105104}
    106105
    107 
    108 LONG CExeModule::Lock()
    109 {
    110     LONG cLocks = ATL::CComModule::Lock();
    111     LogRel(("CExeModule::Lock: cLocks = %d\n", (int)cLocks));
    112     return cLocks;
    113 }
    114 
    115 
    116106LONG CExeModule::Unlock()
    117107{
    118108    LONG cLocks = ATL::CComModule::Unlock();
    119     LogRel(("CExeModule::Unlock: cLocks = %d\n", (int)cLocks));
    120109    if (isIdleLockCount(cLocks))
    121110    {
     
    128117bool CExeModule::HasActiveConnection()
    129118{
    130     const LONG cLocks = GetLockCount();
    131     LogRel(("%s: bActivity = %s;  cLocks = %d\n",
    132             __FUNCTION__,
    133             bActivity ? "TRUE" : "false",
    134             (int)cLocks));
    135     return bActivity || !isIdleLockCount(cLocks);
     119    return bActivity || !isIdleLockCount(GetLockCount());
    136120}
    137121
     
    155139    while (1)
    156140    {
     141        WaitForSingleObject(hEventShutdown, INFINITE);
    157142        DWORD dwWait;
    158         dwWait = WaitForSingleObject(hEventShutdown, INFINITE);
    159         LogRel(("%s: dwWait INFINITE = 0x%x\n", __FUNCTION__, dwWait));       
    160143        do
    161144        {
    162145            bActivity = false;
    163146            dwWait = WaitForSingleObject(hEventShutdown, dwTimeOut);
    164             LogRel(("%s: dwWait %d = 0x%x\n", __FUNCTION__, dwTimeOut, dwWait));
    165147        } while (dwWait == WAIT_OBJECT_0);
    166148        /* timed out */
    167         // LogRel(("%s: dwWait = %x\n", __FUNCTION__, dwWait));
    168149        if (!HasActiveConnection()) /* if no activity let's really bail */
    169150        {
     
    190171#if _WIN32_WINNT >= 0x0400
    191172            CoSuspendClassObjects();
    192             LogRel(("%s (end of loop)\n", __FUNCTION__));
    193173            if (!HasActiveConnection())
    194174#endif
     
    344324            rcRpc, CallAttribs.ClientPID, CallAttribs.IsClientLocal, CallAttribs.ProtocolSequence, CallAttribs.CallStatus,
    345325            CallAttribs.CallType, CallAttribs.OpNum, &CallAttribs.InterfaceUuid));
    346 # else  // XXX: uwe
    347     LogRel(("VirtualBoxClassFactory::i_registerWithSds\n"));
    348326# endif
    349327
     
    376354void VirtualBoxClassFactory::i_deregisterWithSds(void)
    377355{
    378     LogRel(("VirtualBoxClassFactory::i_deregisterWithSds\n"));
     356    Log(("VirtualBoxClassFactory::i_deregisterWithSds\n"));
    379357
    380358    if (m_ptrVirtualBoxSDS.isNotNull())
     
    413391        pObj->AddRef();
    414392        *ppResult = pObj;
    415         LogRel(("VirtualBoxClassFactory::GetVirtualBox: S_OK - %p\n", pObj));
     393        Log(("VirtualBoxClassFactory::GetVirtualBox: S_OK - %p\n", pObj));
    416394        return S_OK;
    417395    }
    418396    *ppResult = NULL;
    419     LogRel(("VirtualBoxClassFactory::GetVirtualBox: E_FAIL\n"));
     397    Log(("VirtualBoxClassFactory::GetVirtualBox: E_FAIL\n"));
    420398    return E_FAIL;
    421399}
     
    453431        {
    454432            AssertMsg(ATL::_pAtlModule, ("ATL: referring to ATL module without having one declared in this linking namespace\n"));
    455             LogRel(("VirtualBoxObjectCached::AddRef: cRefs = 2, LOCKING the module\n"));
    456433            ATL::_pAtlModule->Lock();
    457         }
    458         else
    459         {
    460             LogRel(("VirtualBoxObjectCached::AddRef: cRefs = %u\n", (unsigned)cRefs));
    461434        }
    462435        return cRefs;
     
    467440        ULONG cRefs = InternalRelease();
    468441        if (cRefs == 0)
    469         {
    470             LogRel(("VirtualBoxObjectCached::Release: cRefs = 0: deleting...\n"));
    471442            delete this;
    472         }
    473443        else if (cRefs == 1)
    474444        {
    475445            AssertMsg(ATL::_pAtlModule, ("ATL: referring to ATL module without having one declared in this linking namespace\n"));
    476             LogRel(("VirtualBoxObjectCached::Release: cRefs = 1: unlocking the module\n"));
    477446            ATL::_pAtlModule->Unlock();
    478         }
    479         else
    480         {
    481             LogRel(("VirtualBoxObjectCached::Release: cRefs = %u\n", (unsigned)cRefs));
    482447        }
    483448        return cRefs;
     
    515480                *ppObj = p;
    516481        }
    517         LogRel(("VirtualBoxObjectCached::CreateInstance: %Rhrc\n", hrc));
    518482        return hrc;
    519483    }
     
    562526                     * terminate the module in case when CreateInstance() fails)
    563527                     */
    564                     LogRel(("VirtualBoxClassFactory::CreateInstance: LOCKING the module\n"));
    565528                    ATL::_pAtlModule->Lock();
    566529                    __try
     
    575538                        else if (SUCCEEDED(hrc))
    576539                        {
    577                             LogRel(("VirtualBoxClassFactory::CreateInstance: LOCKING the module\n"));
    578540                            ATL::_pAtlModule->Lock();
    579541                            VirtualBoxObjectCached *p;
     
    596558                    __finally
    597559                    {
    598                         LogRel(("VirtualBoxClassFactory::CreateInstance: finally unlocking the module\n"));
    599560                        ATL::_pAtlModule->Unlock();
    600561                    }
     
    669630        case WM_QUERYENDSESSION:
    670631        {
    671             LogRel(("WM_QUERYENDSESSION\n"));
    672632            if (g_pModule)
    673633            {
     
    679639                    /* decrease a latency of MonitorShutdown loop */
    680640                    ASMAtomicXchgU32(&dwTimeOut, 100);
    681                     LogRel(("VBoxSVCWinMain: WM_QUERYENDSESSION: VBoxSvc has active connections. bActivity = %d. Loc count = %d\n",
     641                    Log(("VBoxSVCWinMain: WM_QUERYENDSESSION: VBoxSvc has active connections. bActivity = %d. Loc count = %d\n",
    682642                         g_pModule->bActivity, g_pModule->GetLockCount()));
    683643                }
     
    690650        case WM_ENDSESSION:
    691651        {
    692             LogRel(("WM_ENDSESSION(%s)\n", wParam == FALSE ? "false" : "true"));
    693652            /* Restore timeout of Monitor Shutdown if user canceled system shutdown */
    694653            if (wParam == FALSE)
    695654            {
    696655                ASMAtomicXchgU32(&dwTimeOut, dwNormalTimeout);
    697                 LogRel(("VBoxSVCWinMain: user canceled system shutdown.\n"));
     656                Log(("VBoxSVCWinMain: user canceled system shutdown.\n"));
    698657            }
    699658            break;
     
    735694    if (atomWindowClass == 0)
    736695    {
    737         LogRel(("Failed to register main window class\n"));
     696        Log(("Failed to register main window class\n"));
    738697        rc = VERR_NOT_SUPPORTED;
    739698    }
     
    747706        if (g_hMainWindow == NULL)
    748707        {
    749             LogRel(("Failed to create main window\n"));
     708            Log(("Failed to create main window\n"));
    750709            rc = VERR_NOT_SUPPORTED;
    751710        }
     
    764723{
    765724    Assert(g_hMainWindow != NULL);
    766     LogRel(("SVCMain: DestroyMainWindow \n"));
     725    Log(("SVCMain: DestroyMainWindow \n"));
    767726    if (g_hMainWindow != NULL)
    768727    {
     
    1014973        if (pszPipeName)
    1015974        {
    1016             LogRel(("SVCMAIN: Processing Helper request (cmdline=\"%s\")...\n", pszPipeName));
     975            Log(("SVCMAIN: Processing Helper request (cmdline=\"%s\")...\n", pszPipeName));
    1017976
    1018977            if (!*pszPipeName)
     
    1029988            if (RT_FAILURE(vrc))
    1030989            {
    1031                 LogRel(("SVCMAIN: Failed to process Helper request (%Rrc).\n", vrc));
     990                Log(("SVCMAIN: Failed to process Helper request (%Rrc).\n", vrc));
    1032991                nRet = 1;
    1033992            }
     
    10471006
    10481007        if (RT_SUCCESS(CreateMainWindow()))
    1049             LogRel(("SVCMain: Main window succesfully created\n"));
     1008            Log(("SVCMain: Main window succesfully created\n"));
    10501009        else
    1051             LogRel(("SVCMain: Failed to create main window\n"));
     1010            Log(("SVCMain: Failed to create main window\n"));
    10521011
    10531012        MSG msg;
     
    10741033    g_pModule = NULL;
    10751034
    1076     LogRel(("SVCMAIN: Returning, COM server process ends.\n"));
     1035    Log(("SVCMAIN: Returning, COM server process ends.\n"));
    10771036    return nRet;
    10781037}
Note: See TracChangeset for help on using the changeset viewer.

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