VirtualBox

Changeset 103293 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 9, 2024 2:35:42 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
161587
Message:

Main/ConsoleImpl.cpp: Some HRESULT vs. VBox status code mixup fixes, bugref:3409

File:
1 edited

Legend:

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

    r102455 r103293  
    974974                                       ComSafeArrayOut(LONG64, timestamps), ComSafeArrayOut(BSTR, flags))
    975975{
    976     AssertReturn(mControl.isNotNull(), VERR_INVALID_POINTER);
     976    AssertReturn(mControl.isNotNull(), E_POINTER);
    977977    return mControl->PullGuestProperties(ComSafeArrayOutArg(names), ComSafeArrayOutArg(values),
    978978                                         ComSafeArrayOutArg(timestamps), ComSafeArrayOutArg(flags));
     
    57135713        {
    57145714            /* No need to call in the EMT thread. */
    5715             hrc = ptrVM.vtable()->pfnVMR3SetCpuExecutionCap(ptrVM.rawUVM(), aExecutionCap);
     5715            int vrc = ptrVM.vtable()->pfnVMR3SetCpuExecutionCap(ptrVM.rawUVM(), aExecutionCap);
     5716            if (RT_FAILURE(vrc))
     5717                hrc = setErrorBoth(E_FAIL, vrc, tr("Failed to change the CPU execution limit (%Rrc)"), vrc);
    57165718        }
    57175719        else
     
    75007502    if (   mRecording.mCtx.IsStarted()
    75017503        && mRecording.mCtx.IsFeatureEnabled(RecordingFeature_Audio))
    7502         return mRecording.mCtx.SendAudioFrame(pvData, cbData, uTimestampMs);
     7504    {
     7505        int vrc = mRecording.mCtx.SendAudioFrame(pvData, cbData, uTimestampMs);
     7506        if (RT_FAILURE(vrc))
     7507            return E_FAIL;
     7508    }
    75037509
    75047510    return S_OK;
     
    95989604
    95999605        ComPtr<IVirtualBox> pVirtualBox;
    9600         mMachine->COMGETTER(Parent)(pVirtualBox.asOutParam());
     9606        hrc = mMachine->COMGETTER(Parent)(pVirtualBox.asOutParam());
    96019607        ComPtr<ISystemProperties> pSystemProperties;
    9602         if (pVirtualBox)
    9603             pVirtualBox->COMGETTER(SystemProperties)(pSystemProperties.asOutParam());
    9604         if (pSystemProperties)
    9605             pSystemProperties->COMGETTER(DefaultCryptoExtPack)(bstrExtPack.asOutParam());
     9608        if (SUCCEEDED(hrc))
     9609            hrc = pVirtualBox->COMGETTER(SystemProperties)(pSystemProperties.asOutParam());
     9610        if (SUCCEEDED(hrc))
     9611            hrc = pSystemProperties->COMGETTER(DefaultCryptoExtPack)(bstrExtPack.asOutParam());
    96069612        if (FAILED(hrc))
    9607             return hrc;
     9613        {
     9614            setErrorBoth(hrc, VERR_INVALID_PARAMETER,
     9615                         tr("Failed to query default extension pack name for the cryptographic module"));
     9616            return VERR_INVALID_PARAMETER;
     9617        }
    96089618
    96099619        Utf8Str strExtPack(bstrExtPack);
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