儲存庫 vbox 的更動 45814
- 時間撮記:
- 2013-4-29 下午02:10:00 (12 年 以前)
- 位置:
- trunk/src/VBox/Main
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/include/VirtualBoxBase.h
r45706 r45814 339 339 } while (0) 340 340 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 347 341 /** 348 342 * Checks that safe array argument is not NULL and returns E_INVALIDARG + … … 377 371 if (RT_UNLIKELY(!RT_VALID_PTR(bstrInCheck) || *(bstrInCheck) == '\0')) \ 378 372 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); \385 373 } while (0) 386 374 -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r45757 r45814 5500 5500 #else /* VBOX_WITH_GUEST_PROPS */ 5501 5501 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")); 5505 5503 if (aValue != NULL && !RT_VALID_PTR(aValue)) 5506 return setError( 0x80face01, tr("Invalid value pointer"));5504 return setError(E_INVALIDARG, tr("Invalid value pointer")); 5507 5505 if (aFlags != NULL && !RT_VALID_PTR(aFlags)) 5508 return setError( 0x80face02, tr("Invalid flags pointer"));5506 return setError(E_INVALIDARG, tr("Invalid flags pointer")); 5509 5507 5510 5508 AutoCaller autoCaller(this); … … 5514 5512 SafeVMPtrQuiet ptrVM(this); 5515 5513 if (FAILED(ptrVM.rc())) 5516 {5517 LogRel(("Console::setGuestProperty1: %ls -> %Rhrc\n", aName, ptrVM.rc())); /* !REMOVE ME! Debugging testboxes! */5518 5514 return ptrVM.rc(); 5519 }5520 5515 5521 5516 /* Note: validity of mVMMDev which is bound to uninit() is guaranteed by … … 5566 5561 hrc = S_OK; 5567 5562 else 5568 {5569 LogRel(("Console::setGuestProperty2: %ls -> %Rrc\n", aName, vrc)); /* !REMOVE ME! Debugging testboxes! */5570 5563 hrc = setError(E_UNEXPECTED, tr("The service call failed with the error %Rrc"), vrc); 5571 }5572 5564 return hrc; 5573 5565 #endif /* VBOX_WITH_GUEST_PROPS */ -
trunk/src/VBox/Main/src-client/SessionImpl.cpp
r45757 r45814 802 802 Global::stringifySessionState(mState)); 803 803 AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE); 804 CheckComArgStrNotEmptyOrNull 1(aName, 0x80face05);804 CheckComArgStrNotEmptyOrNull(aName); 805 805 if (!aIsSetter && !VALID_PTR(aRetValue)) 806 806 return E_POINTER; … … 811 811 /* aValue can be NULL for a setter call if the property is to be deleted. */ 812 812 if (aIsSetter && (aValue != NULL) && !VALID_PTR(aValue)) 813 return setError( 0x80face06, tr("Invalid value pointer"));813 return setError(E_INVALIDARG, tr("Invalid value pointer")); 814 814 /* aFlags can be null if it is to be left as is */ 815 815 if (aIsSetter && (aFlags != NULL) && !VALID_PTR(aFlags)) 816 return setError( 0x80face07, tr("Invalid flags pointer"));816 return setError(E_INVALIDARG, tr("Invalid flags pointer")); 817 817 818 818 /* If this session is not in a VM process fend off the call. The caller … … 824 824 return mConsole->getGuestProperty(aName, aRetValue, aRetTimestamp, aRetFlags); 825 825 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); 831 827 #else /* VBOX_WITH_GUEST_PROPS not defined */ 832 828 ReturnComNotImplemented(); -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r45770 r45814 5725 5725 5726 5726 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; 5732 5728 5733 5729 try … … 5837 5833 rc = E_ACCESSDENIED; 5838 5834 else 5839 { 5840 /** @todo Fix when adding DeleteGuestProperty(), 5841 see defect. */ 5835 /** @todo Fix when adding DeleteGuestProperty(), see defect. */ 5842 5836 rc = directControl->AccessGuestProperty(aName, aValue, aFlags, 5843 5837 true /* isSetter */, 5844 5838 &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 }5853 5839 } 5854 5840 catch (std::bad_alloc &) … … 5867 5853 ReturnComNotImplemented(); 5868 5854 #else // VBOX_WITH_GUEST_PROPS 5869 CheckComArgStrNotEmptyOrNull 1(aName, 0x80face08);5870 CheckComArgMaybeNull 1(aFlags, 0x80face03);5871 CheckComArgMaybeNull 1(aValue, 0x80face04);5855 CheckComArgStrNotEmptyOrNull(aName); 5856 CheckComArgMaybeNull(aFlags); 5857 CheckComArgMaybeNull(aValue); 5872 5858 5873 5859 AutoCaller autoCaller(this); … … 5890 5876 STDMETHODIMP Machine::DeleteGuestProperty(IN_BSTR aName) 5891 5877 { 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); 5895 5879 } 5896 5880
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器