Changeset 78565 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- May 17, 2019 12:06:36 PM (6 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r78509 r78565 4337 4337 tr("Setting passthrough rejected as the device attached to device slot %d on port %d of controller '%s' is not a DVD"), 4338 4338 aDevice, aControllerPort, aName.c_str()); 4339 4340 bool fValueChanged = pAttach->i_getPassthrough() != (aPassthrough != 0); 4341 4339 4342 pAttach->i_updatePassthrough(!!aPassthrough); 4340 4343 … … 4342 4345 alock.release(); 4343 4346 rc = i_onStorageDeviceChange(pAttach, FALSE /* aRemove */, FALSE /* aSilent */); 4344 if (SUCCEEDED(rc) )4347 if (SUCCEEDED(rc) && fValueChanged) 4345 4348 mParent->i_onStorageDeviceChanged(pAttach, FALSE, FALSE); 4346 4349 … … 6157 6160 if (FAILED(rc)) return rc; 6158 6161 6162 MediumAttachmentList llDetachedAttachments; 6159 6163 { 6160 6164 /* find all attached devices to the appropriate storage controller and detach them all */ … … 6177 6181 if (pAttachTemp->i_getControllerName() == aName) 6178 6182 { 6183 llDetachedAttachments.push_back(pAttachTemp); 6179 6184 rc = i_detachDevice(pAttachTemp, alock, NULL); 6180 6185 if (FAILED(rc)) return rc; 6181 6186 } 6182 6187 } 6188 } 6189 6190 /* send event about detached devices before removing parent controller */ 6191 for (MediumAttachmentList::const_iterator 6192 it = llDetachedAttachments.begin(); 6193 it != llDetachedAttachments.end(); 6194 ++it) 6195 { 6196 mParent->i_onStorageDeviceChanged(*it, TRUE, FALSE); 6183 6197 } 6184 6198 -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r78403 r78565 2336 2336 pVirtualBox->i_saveModifiedRegistries(); 2337 2337 2338 if (SUCCEEDED(mrc) )2338 if (SUCCEEDED(mrc) && uId.isValid() && !uId.isZero()) 2339 2339 pVirtualBox->i_onMediumRegistered(uId, devType, FALSE); 2340 2340 … … 8414 8414 8415 8415 if (task.NotifyAboutChanges() && SUCCEEDED(rc)) 8416 { 8416 8417 m->pVirtualBox->i_onMediumConfigChanged(this); 8418 m->pVirtualBox->i_onMediumRegistered(m->id, m->devType, TRUE); 8419 } 8417 8420 8418 8421 return rc; … … 8641 8644 8642 8645 if (task.NotifyAboutChanges() && SUCCEEDED(mrc)) 8646 { 8643 8647 m->pVirtualBox->i_onMediumConfigChanged(this); 8648 m->pVirtualBox->i_onMediumRegistered(m->id, m->devType, TRUE); 8649 } 8644 8650 8645 8651 return mrc; … … 9650 9656 9651 9657 /* Reset UUID to prevent Create* from reusing it again */ 9658 com::Guid uOldId = m->id; 9652 9659 unconst(m->id).clear(); 9653 9660 9654 if (task.NotifyAboutChanges() && SUCCEEDED(rc) && m->pParent.isNotNull()) 9655 m->pVirtualBox->i_onMediumConfigChanged(m->pParent); 9661 if (task.NotifyAboutChanges() && SUCCEEDED(rc)) 9662 { 9663 if (m->pParent.isNotNull()) 9664 m->pVirtualBox->i_onMediumConfigChanged(m->pParent); 9665 m->pVirtualBox->i_onMediumRegistered(uOldId, m->devType, TRUE); 9666 } 9656 9667 9657 9668 return rc; -
trunk/src/VBox/Main/src-server/SnapshotImpl.cpp
r76592 r78565 3234 3234 else 3235 3235 { 3236 for (ComObjPtr<Medium> pTmpMedium = it->mpSource ->i_getParent();3236 for (ComObjPtr<Medium> pTmpMedium = it->mpSource; 3237 3237 pTmpMedium && pTmpMedium != it->mpTarget; 3238 3238 pTmpMedium = pTmpMedium->i_getParent()) -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r78261 r78565 1978 1978 { 1979 1979 medium.queryInterfaceTo(aMedium.asOutParam()); 1980 i_onMediumRegistered(medium->i_getId(), medium->i_getDeviceType(), TRUE); 1980 com::Guid uMediumId = medium->i_getId(); 1981 if (uMediumId.isValid() && !uMediumId.isZero()) 1982 i_onMediumRegistered(uMediumId, medium->i_getDeviceType(), TRUE); 1981 1983 } 1982 1984
Note:
See TracChangeset
for help on using the changeset viewer.