VirtualBox

Changeset 94713 in vbox


Ignore:
Timestamp:
Apr 27, 2022 7:25:52 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151092
Message:

Main/Update check: Fixes for event handling. bugref:7983

File:
1 edited

Legend:

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

    r94710 r94713  
    290290HRESULT UpdateAgent::init(VirtualBox *aVirtualBox)
    291291{
    292     // Enclose the state transition NotReady->InInit->Ready.
    293     AutoInitSpan autoInitSpan(this);
    294     AssertReturn(autoInitSpan.isOk(), E_FAIL);
    295 
    296292    /* Weak reference to a VirtualBox object */
    297293    unconst(m_VirtualBox) = aVirtualBox;
     
    299295    HRESULT hr = unconst(m_EventSource).createObject();
    300296    if (SUCCEEDED(hr))
    301     {
    302297        hr = m_EventSource->init();
    303         if (SUCCEEDED(hr))
    304             autoInitSpan.setSucceeded();
    305     }
    306298
    307299    return hr;
     
    751743    ::FireUpdateAgentErrorEvent(m_EventSource, psz, vrc);
    752744
    753     HRESULT const rc = setErrorVrc(VERR_COM_IPRT_ERROR /** @todo Translate HTTP errors to COM? */, pcszMsgFmt, va);
     745    HRESULT const rc = setErrorVrc(VERR_COM_IPRT_ERROR /** @todo Translate HTTP errors to COM? */, psz);
    754746
    755747    va_end(va);
     
    790782    AutoInitSpan autoInitSpan(this);
    791783    AssertReturn(autoInitSpan.isOk(), E_FAIL);
    792 
    793     /* Weak reference to a VirtualBox object */
    794     unconst(m_VirtualBox) = aVirtualBox;
    795784
    796785    /* Initialize the bare minimum to get things going.
     
    802791    m->strRepoUrl = "https://update.virtualbox.org";
    803792
    804     autoInitSpan.setSucceeded();
    805     return S_OK;
     793    HRESULT hr = UpdateAgent::init(aVirtualBox);
     794    if (SUCCEEDED(hr))
     795        autoInitSpan.setSucceeded();
     796
     797    return hr;
    806798}
    807799
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