VirtualBox

Changeset 106026 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Sep 12, 2024 11:21:40 AM (6 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164775
Message:

Main/ConsoleImpl.cpp: Converted release assertion in Console::i_changeNetworkAttachment to AssertLogRelMsgReturn and wrapped up 7 IPC calls only needed for a debug assertion inside a #ifdef VBOX_STRICT/#endif.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r106023 r106026  
    53285328 * @note The VM must not be running.
    53295329 */
    5330 DECLCALLBACK(int) Console::i_changeNetworkAttachment(Console *pThis,
    5331                                                      PUVM pUVM,
    5332                                                      PCVMMR3VTABLE pVMM,
    5333                                                      const char *pszDevice,
    5334                                                      unsigned uInstance,
    5335                                                      unsigned uLun,
    5336                                                      INetworkAdapter *aNetworkAdapter)
     5330/*static*/ DECLCALLBACK(int) Console::i_changeNetworkAttachment(Console *pThis,
     5331                                                                PUVM pUVM,
     5332                                                                PCVMMR3VTABLE pVMM,
     5333                                                                const char *pszDevice,
     5334                                                                unsigned uInstance,
     5335                                                                unsigned uLun,
     5336                                                                INetworkAdapter *aNetworkAdapter)
    53375337{
    53385338    LogFlowFunc(("pThis=%p pszDevice=%p:{%s} uInstance=%u uLun=%u aNetworkAdapter=%p\n",
     
    53445344    AssertComRCReturn(autoCaller.hrc(), VERR_ACCESS_DENIED);
    53455345
     5346#ifdef VBOX_STRICT
    53465347    ComPtr<IPlatform> pPlatform;
    53475348    HRESULT hrc = pThis->mMachine->COMGETTER(Platform)(pPlatform.asOutParam());
     
    53665367    hrc = pPlatformProperties->GetMaxNetworkAdapters(chipsetType, &maxNetworkAdapters);
    53675368    AssertComRC(hrc);
    5368     AssertMsg(   (   !strcmp(pszDevice, "pcnet")
    5369                   || !strcmp(pszDevice, "e1000")
    5370                   || !strcmp(pszDevice, "virtio-net"))
    5371               && uLun == 0
    5372               && uInstance < maxNetworkAdapters,
     5369    AssertMsg(uLun == 0 && uInstance < maxNetworkAdapters,
    53735370              ("pszDevice=%s uLun=%d uInstance=%d\n", pszDevice, uLun, uInstance));
     5371#endif
    53745372    Log(("pszDevice=%s uLun=%d uInstance=%d\n", pszDevice, uLun, uInstance));
    53755373
     
    53775375     * Check the VM for correct state.
    53785376     */
    5379     PCFGMNODE pCfg = NULL;          /* /Devices/Dev/.../Config/ */
     5377    PCFGMNODE pCfg   = NULL;        /* /Devices/Dev/.../Config/ */
    53805378    PCFGMNODE pLunL0 = NULL;        /* /Devices/Dev/0/LUN#0/ */
    5381     PCFGMNODE pInst = pVMM->pfnCFGMR3GetChildF(pVMM->pfnCFGMR3GetRootU(pUVM), "Devices/%s/%d/", pszDevice, uInstance);
    5382     AssertRelease(pInst);
     5379    PCFGMNODE pInst  = pVMM->pfnCFGMR3GetChildF(pVMM->pfnCFGMR3GetRootU(pUVM), "Devices/%s/%d/", pszDevice, uInstance);
     5380    AssertLogRelMsgReturn(pInst, ("pszDevices=%s uInstance=%u\n", pszDevice, uInstance), VERR_CFGM_CHILD_NOT_FOUND);
    53835381
    53845382    int vrc = pThis->i_configNetwork(pszDevice, uInstance, uLun, aNetworkAdapter, pCfg, pLunL0, pInst,
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