Changeset 96137 in vbox for trunk/src/VBox/Main/src-server/RecordingSettingsImpl.cpp
- Timestamp:
- Aug 11, 2022 2:35:45 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/RecordingSettingsImpl.cpp
r95918 r96137 246 246 const bool fEnabled = RT_BOOL(enable); 247 247 248 HRESULT rc = S_OK;248 HRESULT hrc = S_OK; 249 249 250 250 if (m->bd->fEnabled != fEnabled) … … 255 255 alock.release(); 256 256 257 rc = m->pMachine->i_onRecordingChange(enable); 258 if (FAILED(rc)) 259 { 257 hrc = m->pMachine->i_onRecordingChange(enable); 258 if (FAILED(hrc)) 259 { 260 com::ErrorInfo errMachine; /* Get error info from machine call above. */ 261 260 262 /* 261 263 * Normally we would do the actual change _after_ i_onRecordingChange() succeeded. … … 266 268 alock.acquire(); 267 269 m->bd->fEnabled = m->bd.backedUpData()->fEnabled; 270 271 if (errMachine.isBasicAvailable()) 272 hrc = setError(errMachine); 268 273 } 269 274 else … … 278 283 /** Save settings if online - @todo why is this required? -- @bugref{6818} */ 279 284 if (Global::IsOnline(m->pMachine->i_getMachineState())) 280 rc = m->pMachine->i_saveSettings(NULL, mlock); 281 } 282 } 283 284 return rc; 285 { 286 com::ErrorInfo errMachine; 287 hrc = m->pMachine->i_saveSettings(NULL, mlock); 288 if (FAILED(hrc)) 289 { 290 /* Got error info from machine call above. */ 291 if (errMachine.isBasicAvailable()) 292 hrc = setError(errMachine); 293 } 294 } 295 } 296 } 297 298 return hrc; 285 299 } 286 300
Note:
See TracChangeset
for help on using the changeset viewer.