diff options
Diffstat (limited to 'src/VBox/Main/MachineImpl.cpp')
| -rw-r--r-- | src/VBox/Main/MachineImpl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/VBox/Main/MachineImpl.cpp b/src/VBox/Main/MachineImpl.cpp index a8dbc0bde..b9db74c2d 100644 --- a/src/VBox/Main/MachineImpl.cpp +++ b/src/VBox/Main/MachineImpl.cpp @@ -1,4 +1,4 @@ -/* $Id: MachineImpl.cpp 16001 2009-01-16 16:56:47Z vboxsync $ */ +/* $Id: MachineImpl.cpp $ */ /** @file * Implementation of IMachine in VBoxSVC. @@ -901,13 +901,19 @@ STDMETHODIMP Machine::COMSETTER(OSTypeId) (IN_BSTR aOSTypeId) guestOSType.asOutParam()); CheckComRCReturnRC (rc); + /* when setting, always use the "etalon" value for consistency -- lookup + * by ID is case-insensitive and the input value may have different case */ + Bstr osTypeId; + rc = guestOSType->COMGETTER(Id) (osTypeId.asOutParam()); + CheckComRCReturnRC (rc); + AutoWriteLock alock (this); rc = checkStateDependency (MutableStateDep); CheckComRCReturnRC (rc); mUserData.backup(); - mUserData->mOSTypeId = aOSTypeId; + mUserData->mOSTypeId = osTypeId; return S_OK; } |
