Changeset 85307 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Jul 13, 2020 12:38:15 PM (5 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r85301 r85307 345 345 ComPtr<IExtraDataChangedEvent> pEDCEv = aEvent; 346 346 Bstr strMachineId; 347 HRESULT hrc = pEDCEv->COMGETTER(MachineId)(strMachineId.asOutParam()); 348 if (FAILED(hrc)) break; 349 347 350 Bstr strKey; 348 Bstr strVal;349 HRESULT hrc = S_OK;350 351 hrc = pEDCEv->COMGETTER(MachineId)(strMachineId.asOutParam());352 if (FAILED(hrc)) break;353 354 351 hrc = pEDCEv->COMGETTER(Key)(strKey.asOutParam()); 355 352 if (FAILED(hrc)) break; 356 353 354 Bstr strVal; 357 355 hrc = pEDCEv->COMGETTER(Value)(strVal.asOutParam()); 358 356 if (FAILED(hrc)) break; … … 5224 5222 AssertComRCReturnRC(autoCaller.rc()); 5225 5223 5226 ::FireStorageControllerChangedEvent(mEventSource, Bstr(aMachineId.toString()).raw(), Bstr(aControllerName).raw());5224 ::FireStorageControllerChangedEvent(mEventSource, aMachineId.toString(), aControllerName); 5227 5225 5228 5226 LogFlowThisFunc(("Leaving rc=%#x\n", S_OK)); … … 6065 6063 } 6066 6064 6067 HRESULT Console::i_onExtraDataChange( IN_BSTR aMachineId, IN_BSTR aKey, IN_BSTRaVal)6065 HRESULT Console::i_onExtraDataChange(const Bstr &aMachineId, const Bstr &aKey, const Bstr &aVal) 6068 6066 { 6069 6067 LogFlowThisFunc(("\n")); … … 6073 6071 return autoCaller.rc(); 6074 6072 6075 if ( !aMachineId)6073 if (aMachineId != i_getId()) 6076 6074 return S_OK; 6077 6075 6078 HRESULT hrc = S_OK;6079 Bstr idMachine(aMachineId);6080 if ( FAILED(hrc)6081 || idMachine != i_getId())6082 return hrc;6083 6084 6076 /* don't do anything if the VM isn't running */ 6085 SafeVMPtrQuiet ptrVM(this);6086 if (ptrVM.isOk())6087 {6088 if ( RTUtf16CmpAscii(aKey, "VBoxInternal2/TurnResetIntoPowerOff") == 0)6089 { 6090 mfTurnResetIntoPowerOff = RTUtf16CmpAscii(aVal, "1") == 0;6077 if (aKey == "VBoxInternal2/TurnResetIntoPowerOff") 6078 { 6079 SafeVMPtrQuiet ptrVM(this); 6080 if (ptrVM.isOk()) 6081 { 6082 mfTurnResetIntoPowerOff = aVal == "1"; 6091 6083 int vrc = VMR3SetPowerOffInsteadOfReset(ptrVM.rawUVM(), mfTurnResetIntoPowerOff); 6092 6084 AssertRC(vrc); 6093 } 6094 6095 ptrVM.release();6085 6086 ptrVM.release(); 6087 } 6096 6088 } 6097 6089 6098 6090 /* notify console callbacks on success */ 6099 if (SUCCEEDED(hrc)) 6100 ::FireExtraDataChangedEvent(mEventSource, aMachineId, aKey, aVal); 6101 6102 LogFlowThisFunc(("Leaving hrc=%#x\n", hrc)); 6103 return hrc; 6091 ::FireExtraDataChangedEvent(mEventSource, aMachineId.raw(), aKey.raw(), aVal.raw()); 6092 6093 LogFlowThisFunc(("Leaving S_OK\n")); 6094 return S_OK; 6104 6095 } 6105 6096 -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r85300 r85307 789 789 if (fDisabled) 790 790 ::FireGuestMonitorChangedEvent(mParent->i_getEventSource(), 791 GuestMonitorChangedEventType_Disabled, 791 GuestMonitorChangedEventType_Disabled, uScreenId, 0, 0, 0, 0); 792 792 else 793 793 ::FireGuestMonitorChangedEvent(mParent->i_getEventSource(), -
trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
r85300 r85307 527 527 528 528 com::SafeArray<BYTE> data((size_t)cbRead); 529 data.initFrom((BYTE *)dataCb.u.read.pvData, cbRead);529 data.initFrom((BYTE *)dataCb.u.read.pvData, cbRead); 530 530 531 531 ::FireGuestFileReadEvent(mEventSource, mSession, this, mData.mOffCurrent, cbRead, ComSafeArrayAsInParam(data));
Note:
See TracChangeset
for help on using the changeset viewer.