Changeset 46302 in vbox for trunk/src/VBox/Main
- Timestamp:
- May 28, 2013 8:27:31 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86055
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r46285 r46302 5893 5893 5894 5894 bool fDelete = !RT_VALID_PTR(aValue) || *(aValue) == '\0'; 5895 HWData::GuestPropertyMap::iterator it = 5896 mHWData->mGuestProperties.find(utf8Name); 5897 5895 HWData::GuestPropertyMap::iterator it = mHWData->mGuestProperties.find(utf8Name); 5898 5896 if (it == mHWData->mGuestProperties.end()) 5899 5897 { … … 5940 5938 } 5941 5939 else 5942 {5943 5940 mHWData->mGuestProperties.erase(it); 5944 }5945 5941 } 5946 5942 } … … 13237 13233 * Convert input up front. 13238 13234 */ 13239 Utf8Str 13240 uint32_t 13235 Utf8Str utf8Name(aName); 13236 uint32_t fFlags = NILFLAG; 13241 13237 if (aFlags) 13242 13238 { … … 13275 13271 mHWData.backup(); 13276 13272 13273 bool fDelete = !RT_VALID_PTR(aValue) || *(aValue) == '\0'; 13277 13274 HWData::GuestPropertyMap::iterator it = mHWData->mGuestProperties.find(utf8Name); 13278 13275 if (it != mHWData->mGuestProperties.end()) 13279 13276 { 13280 if ( RT_VALID_PTR(aValue) && *(aValue) != '\0')13277 if (!fDelete) 13281 13278 { 13282 13279 it->second.strValue = aValue; … … 13286 13283 else 13287 13284 mHWData->mGuestProperties.erase(it); 13288 13285 13286 mData->mGuestPropertiesModified = TRUE; 13287 } 13288 else if (!fDelete) 13289 { 13290 HWData::GuestProperty prop; 13291 prop.strValue = aValue; 13292 prop.mTimestamp = aTimestamp; 13293 prop.mFlags = fFlags; 13294 13295 mHWData->mGuestProperties[utf8Name] = prop; 13289 13296 mData->mGuestPropertiesModified = TRUE; 13290 13297 }
Note:
See TracChangeset
for help on using the changeset viewer.