Changeset 45909 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- May 6, 2013 1:26:33 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85537
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r45882 r45909 5752 5752 Utf8Str utf8Flags(aFlags); 5753 5753 uint32_t fFlags = NILFLAG; 5754 if ( (aFlags != NULL) 5755 && RT_FAILURE(validateFlags(utf8Flags.c_str(), &fFlags)) 5756 ) 5754 if ( aFlags != NULL 5755 && RT_FAILURE(validateFlags(utf8Flags.c_str(), &fFlags))) 5757 5756 return setError(E_INVALIDARG, 5758 5757 tr("Invalid guest property flag values: '%ls'"), 5759 5758 aFlags); 5760 5759 5760 bool fDelete = !RT_VALID_PTR(aValue) || *(aValue) == '\0'; 5761 5761 HWData::GuestPropertyMap::iterator it = 5762 5762 mHWData->mGuestProperties.find(utf8Name); … … 5764 5764 if (it == mHWData->mGuestProperties.end()) 5765 5765 { 5766 setModified(IsModified_MachineData); 5767 mHWData.backupEx(); 5768 5769 RTTIMESPEC time; 5770 HWData::GuestProperty prop; 5771 prop.strValue = aValue; 5772 prop.mTimestamp = RTTimeSpecGetNano(RTTimeNow(&time)); 5773 prop.mFlags = fFlags; 5774 5775 mHWData->mGuestProperties[Utf8Str(aName)] = prop; 5766 /* only create the new property if this is really desired */ 5767 if (!fDelete) 5768 { 5769 setModified(IsModified_MachineData); 5770 mHWData.backupEx(); 5771 5772 RTTIMESPEC time; 5773 HWData::GuestProperty prop; 5774 prop.strValue = aValue; 5775 prop.mTimestamp = RTTimeSpecGetNano(RTTimeNow(&time)); 5776 prop.mFlags = fFlags; 5777 5778 mHWData->mGuestProperties[Utf8Str(aName)] = prop; 5779 } 5776 5780 } 5777 5781 else … … 5793 5797 Assert(it != mHWData->mGuestProperties.end()); 5794 5798 5795 if ( RT_VALID_PTR(aValue) && *(aValue) != '\0')5799 if (!fDelete) 5796 5800 { 5797 5801 RTTIMESPEC time;
Note:
See TracChangeset
for help on using the changeset viewer.