Changeset 54523 in vbox
- Timestamp:
- Feb 26, 2015 8:45:50 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r54421 r54523 85 85 { 86 86 using namespace com; 87 bool fNeedsSaving = false; 87 88 HRESULT rc; 88 89 … … 100 101 CHECK_ERROR_RET(machine, LockMachine(a->session, LockType_Shared), 1); 101 102 103 ComPtr<IConsole> console; 104 ComPtr<IMachine> sessionMachine; 105 102 106 do 103 107 { 104 108 /* get the associated console */ 105 ComPtr<IConsole> console;106 109 CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam())); 107 110 /* ... and session machine */ 108 ComPtr<IMachine> sessionMachine;109 111 CHECK_ERROR_BREAK(a->session, COMGETTER(Machine)(sessionMachine.asOutParam())); 110 112 … … 561 563 #undef ITERATE_TO_NEXT_TERM 562 564 } 563 /* commit changes */564 565 if (SUCCEEDED(rc)) 565 CHECK_ERROR(sessionMachine, SaveSettings());566 fNeedsSaving = true; 566 567 } 567 568 else if (!strncmp(a->argv[1], "nicproperty", 11)) … … 603 604 Bstr bstrValue = &pDelimiter[1]; 604 605 CHECK_ERROR(adapter, SetProperty(bstrName.raw(), bstrValue.raw())); 606 if (SUCCEEDED(rc)) 607 fNeedsSaving = true; 605 608 } 606 609 else … … 665 668 666 669 CHECK_ERROR(adapter, COMSETTER(PromiscModePolicy)(enmPromiscModePolicy)); 670 if (SUCCEEDED(rc)) 671 fNeedsSaving = true; 667 672 } 668 673 else … … 1663 1668 } while (0); 1664 1669 1670 /* The client has to trigger saving the state explicitely. */ 1671 if (fNeedsSaving) 1672 CHECK_ERROR(sessionMachine, SaveSettings()); 1673 1665 1674 a->session->UnlockMachine(); 1666 1675
Note:
See TracChangeset
for help on using the changeset viewer.