VirtualBox

儲存庫 vbox 的更動 45814


忽略:
時間撮記:
2013-4-29 下午02:10:00 (12 年 以前)
作者:
vboxsync
訊息:

Main: removed all these recent hacks for debugging the testboxes

位置:
trunk/src/VBox/Main
檔案:
修改 4 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/include/VirtualBoxBase.h

    r45706 r45814  
    339339    } while (0)
    340340
    341 #define CheckComArgMaybeNull1(arg, err) \
    342     do { \
    343         if (RT_UNLIKELY(!RT_VALID_PTR(arg) && (arg) != NULL)) \
    344             return setError(err, tr("Argument %s is an invalid pointer"), #arg); \
    345     } while (0)
    346 
    347341/**
    348342 * Checks that safe array argument is not NULL and returns E_INVALIDARG +
     
    377371        if (RT_UNLIKELY(!RT_VALID_PTR(bstrInCheck) || *(bstrInCheck) == '\0')) \
    378372            return setError(E_INVALIDARG, tr("Argument %s is empty or an invalid pointer"), #a_bstrIn); \
    379     } while (0)
    380 #define CheckComArgStrNotEmptyOrNull1(a_bstrIn, err) \
    381     do { \
    382         IN_BSTR const bstrInCheck = (a_bstrIn); /* type check */ \
    383         if (RT_UNLIKELY(!RT_VALID_PTR(bstrInCheck) || *(bstrInCheck) == '\0')) \
    384             return setError(err, tr("Argument %s is empty or an invalid pointer"), #a_bstrIn); \
    385373    } while (0)
    386374
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r45757 r45814  
    55005500#else /* VBOX_WITH_GUEST_PROPS */
    55015501    if (!RT_VALID_PTR(aName))
    5502         /** @todo replace hardcoded constants with E_INVALIDARG once testboxes has
    5503          *        been debugged. */
    5504         return setError(0x80face00, tr("Name cannot be NULL or an invalid pointer"));
     5502        return setError(E_INVALIDARG, tr("Name cannot be NULL or an invalid pointer"));
    55055503    if (aValue != NULL && !RT_VALID_PTR(aValue))
    5506         return setError(0x80face01, tr("Invalid value pointer"));
     5504        return setError(E_INVALIDARG, tr("Invalid value pointer"));
    55075505    if (aFlags != NULL && !RT_VALID_PTR(aFlags))
    5508         return setError(0x80face02, tr("Invalid flags pointer"));
     5506        return setError(E_INVALIDARG, tr("Invalid flags pointer"));
    55095507
    55105508    AutoCaller autoCaller(this);
     
    55145512    SafeVMPtrQuiet ptrVM(this);
    55155513    if (FAILED(ptrVM.rc()))
    5516     {
    5517         LogRel(("Console::setGuestProperty1: %ls -> %Rhrc\n", aName, ptrVM.rc())); /* !REMOVE ME! Debugging testboxes! */
    55185514        return ptrVM.rc();
    5519     }
    55205515
    55215516    /* Note: validity of mVMMDev which is bound to uninit() is guaranteed by
     
    55665561        hrc = S_OK;
    55675562    else
    5568     {
    5569         LogRel(("Console::setGuestProperty2: %ls -> %Rrc\n", aName, vrc)); /* !REMOVE ME! Debugging testboxes! */
    55705563        hrc = setError(E_UNEXPECTED, tr("The service call failed with the error %Rrc"), vrc);
    5571     }
    55725564    return hrc;
    55735565#endif /* VBOX_WITH_GUEST_PROPS */
  • trunk/src/VBox/Main/src-client/SessionImpl.cpp

    r45757 r45814  
    802802                        Global::stringifySessionState(mState));
    803803    AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE);
    804     CheckComArgStrNotEmptyOrNull1(aName, 0x80face05);
     804    CheckComArgStrNotEmptyOrNull(aName);
    805805    if (!aIsSetter && !VALID_PTR(aRetValue))
    806806        return E_POINTER;
     
    811811    /* aValue can be NULL for a setter call if the property is to be deleted. */
    812812    if (aIsSetter && (aValue != NULL) && !VALID_PTR(aValue))
    813         return setError(0x80face06, tr("Invalid value pointer"));
     813        return setError(E_INVALIDARG, tr("Invalid value pointer"));
    814814    /* aFlags can be null if it is to be left as is */
    815815    if (aIsSetter && (aFlags != NULL) && !VALID_PTR(aFlags))
    816         return setError(0x80face07, tr("Invalid flags pointer"));
     816        return setError(E_INVALIDARG, tr("Invalid flags pointer"));
    817817
    818818    /* If this session is not in a VM process fend off the call. The caller
     
    824824        return mConsole->getGuestProperty(aName, aRetValue, aRetTimestamp, aRetFlags);
    825825    else
    826     {
    827         HRESULT rc = mConsole->setGuestProperty(aName, aValue, aFlags);
    828         LogRel(("Session::AccessGuestProperty: %ls -> %Rhrc\n", aName, rc)); /* !REMOVE ME! Debugging testboxes! */
    829         return rc;
    830     }
     826        return mConsole->setGuestProperty(aName, aValue, aFlags);
    831827#else /* VBOX_WITH_GUEST_PROPS not defined */
    832828    ReturnComNotImplemented();
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r45770 r45814  
    57255725
    57265726    rc = checkStateDependency(MutableStateDep);
    5727     if (FAILED(rc))
    5728     {
    5729         LogRel(("Machine::setGuestPropertyToService: %ls -> %Rhrc\n", aName, rc)); /* !REMOVE ME! Debugging testboxes! */
    5730         return rc;
    5731     }
     5727    if (FAILED(rc)) return rc;
    57325728
    57335729    try
     
    58375833            rc = E_ACCESSDENIED;
    58385834        else
    5839         {
    5840             /** @todo Fix when adding DeleteGuestProperty(),
    5841                          see defect. */
     5835            /** @todo Fix when adding DeleteGuestProperty(), see defect. */
    58425836            rc = directControl->AccessGuestProperty(aName, aValue, aFlags,
    58435837                                                    true /* isSetter */,
    58445838                                                    &dummy, &dummy64, &dummy);
    5845             if (FAILED(rc))
    5846             {
    5847                 LogRel(("Machine::setGuestPropertyToVM: %ls -> %Rhrc\n", aName, rc)); /* !REMOVE ME! Debugging testboxes! */
    5848                 /* testbox hacking: a shot in the dark. */
    5849                 ErrorInfoKeeper eik;
    5850                 return rc;
    5851             }
    5852         }
    58535839    }
    58545840    catch (std::bad_alloc &)
     
    58675853    ReturnComNotImplemented();
    58685854#else // VBOX_WITH_GUEST_PROPS
    5869     CheckComArgStrNotEmptyOrNull1(aName, 0x80face08);
    5870     CheckComArgMaybeNull1(aFlags, 0x80face03);
    5871     CheckComArgMaybeNull1(aValue, 0x80face04);
     5855    CheckComArgStrNotEmptyOrNull(aName);
     5856    CheckComArgMaybeNull(aFlags);
     5857    CheckComArgMaybeNull(aValue);
    58725858
    58735859    AutoCaller autoCaller(this);
     
    58905876STDMETHODIMP Machine::DeleteGuestProperty(IN_BSTR aName)
    58915877{
    5892     HRESULT hrc = SetGuestProperty(aName, NULL, NULL);
    5893     LogRel(("DeleteGuestProperty: %ls -> %Rhrc\n", aName, hrc)); /* !REMOVE ME! Debugging testboxes! */
    5894     return hrc;
     5878    return SetGuestProperty(aName, NULL, NULL);
    58955879}
    58965880
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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