VirtualBox

Ignore:
Timestamp:
Oct 14, 2015 1:13:00 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Networking cleanup/rework (part 2): Small RTHttp prepare/cleanup adjustment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp

    r58236 r58237  
    374374    RTR3InitExeNoArguments(RTR3INIT_FLAGS_SUPLIB); /** @todo r=bird: WTF? */
    375375
    376     /* Create HTTP object: */
     376    /* Create HTTP client: */
     377    m_iError = RTHttpCreate(&m_hHttp);
    377378    if (RT_SUCCESS(m_iError))
    378         m_iError = RTHttpCreate(&m_hHttp);
    379 
    380     /* Apply proxy-rules: */
    381     if (RT_SUCCESS(m_iError))
    382         m_iError = applyProxyRules();
    383 
    384     /* Apply https-certificates: */
    385     if (RT_SUCCESS(m_iError))
    386         m_iError = applyHttpsCertificates();
    387 
    388     /* Assign raw-headers: */
    389     if (RT_SUCCESS(m_iError))
    390         m_iError = applyRawHeaders();
    391 
    392     /* Perform main request: */
    393     if (RT_SUCCESS(m_iError))
    394         m_iError = performMainRequest();
    395 
    396     /* Destroy HTTP client instance: */
    397     RTHTTP hHttp = m_hHttp;
    398     if (hHttp != NIL_RTHTTP)
    399     {
    400         /** @todo r=bird: There is a race here between this and abort()! */
    401         m_hHttp = NIL_RTHTTP;
    402         RTHttpDestroy(hHttp);
     379    {
     380        /* Apply proxy-rules: */
     381        if (RT_SUCCESS(m_iError))
     382            m_iError = applyProxyRules();
     383
     384        /* Apply https-certificates: */
     385        if (RT_SUCCESS(m_iError))
     386            m_iError = applyHttpsCertificates();
     387
     388        /* Assign raw-headers: */
     389        if (RT_SUCCESS(m_iError))
     390            m_iError = applyRawHeaders();
     391
     392        /* Perform main request: */
     393        if (RT_SUCCESS(m_iError))
     394            m_iError = performMainRequest();
     395
     396        /* Destroy HTTP client: */
     397        RTHTTP hHttp = m_hHttp;
     398        if (hHttp != NIL_RTHTTP)
     399        {
     400            /** @todo r=bird: There is a race here between this and abort()! */
     401            m_hHttp = NIL_RTHTTP;
     402            RTHttpDestroy(hHttp);
     403        }
    403404    }
    404405}
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