Changeset 94685 in vbox
- Timestamp:
- Apr 22, 2022 10:16:24 AM (3 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageUpdateCheck.cpp
r94670 r94685 184 184 else if (!RTStrICmp(ValueUnion.psz, "withbetas")) 185 185 enmChannel = UpdateChannel_WithBetas; 186 /** @todo UpdateChannel_WithTesting once supported. */ 186 187 else if (!RTStrICmp(ValueUnion.psz, "all")) 187 188 enmChannel = UpdateChannel_All; … … 196 197 break; 197 198 199 /** @todo Add more options like proxy + repo handling etc. */ 200 198 201 default: 199 202 return errorGetOpt(c, &ValueUnion); … … 201 204 } 202 205 203 if ( fEnabled == -1204 && enmChannel != enmChannelNil206 if ( fEnabled == -1 207 && enmChannel == enmChannelNil 205 208 && cFrequencyDays == 0) 206 209 return errorSyntax(UpdateCheck::tr("No change requested")); … … 221 224 CHECK_ERROR2I_RET(pUpdateAgent, COMSETTER(CheckFrequency)(cFrequencyDays * RT_SEC_1DAY), RTEXITCODE_FAILURE); 222 225 } 223 224 226 return RTEXITCODE_SUCCESS; 225 227 } -
trunk/src/VBox/Main/include/UpdateAgentImpl.h
r94670 r94685 128 128 129 129 protected: 130 /** @name Wrapped IUpdateAgent attributes and methods 130 131 /** @name Internal helper methods. 132 * @{ */ 133 HRESULT i_commitSettings(AutoWriteLock &aLock); 134 /** @} */ 135 136 protected: 137 /** @name Wrapped IUpdateAgent attributes and methods. 131 138 * @{ */ 132 139 HRESULT checkFor(ComPtr<IProgress> &aProgress); -
trunk/src/VBox/Main/src-server/HostImpl.cpp
r94643 r94685 2085 2085 RT_NOREF(data); 2086 2086 #endif /* VBOX_WITH_USB */ 2087 2088 #ifdef VBOX_WITH_UPDATE_AGENT 2089 rc = m->pUpdateHost->i_loadSettings(data.updateHost); 2090 ComAssertComRCRet(rc, rc); 2091 /** @todo Add handling for ExtPack and Guest Additions updates here later. See @bugref{7983}. */ 2092 #endif 2093 2087 2094 return rc; 2088 2095 } -
trunk/src/VBox/Main/src-server/UpdateAgentImpl.cpp
r94670 r94685 238 238 m->fEnabled = aEnabled; 239 239 240 return S_OK;240 return i_commitSettings(alock); 241 241 } 242 242 … … 278 278 m->uCheckFreqSeconds = aFreqSeconds; 279 279 280 return S_OK;280 return i_commitSettings(alock); 281 281 } 282 282 … … 296 296 m->enmChannel = aChannel; 297 297 298 return S_OK;298 return i_commitSettings(alock); 299 299 } 300 300 … … 326 326 m->strRepoUrl = aRepo; 327 327 328 return S_OK;328 return i_commitSettings(alock); 329 329 } 330 330 … … 344 344 m->enmProxyMode = aMode; 345 345 346 return S_OK;346 return i_commitSettings(alock); 347 347 } 348 348 … … 362 362 m->strProxyUrl = aAddress; 363 363 364 return S_OK;364 return i_commitSettings(alock); 365 365 } 366 366 … … 579 579 m->uCheckCount = aCount; 580 580 581 return S_OK;581 return i_commitSettings(alock); 582 582 } 583 583 … … 591 591 m->strLastCheckDate = aDate; 592 592 593 return S_OK; 593 return i_commitSettings(alock); 594 } 595 596 597 /********************************************************************************************************************************* 598 * Internal helper methods * 599 *********************************************************************************************************************************/ 600 601 /** 602 * Internal helper function to commit modified settings. 603 * 604 * @returns HRESULT 605 * @param aLock Write lock to release before committing settings. 606 */ 607 HRESULT UpdateAgent::i_commitSettings(AutoWriteLock &aLock) 608 { 609 aLock.release(); 610 611 AutoWriteLock vboxLock(m_VirtualBox COMMA_LOCKVAL_SRC_POS); 612 return m_VirtualBox->i_saveSettings(); 594 613 } 595 614 … … 799 818 m->uCheckCount++; 800 819 820 rc = i_commitSettings(alock); 821 AssertComRCReturn(rc, rc); 822 801 823 strUrl.appendPrintf("&count=%RU32", m->uCheckCount); 802 803 alock.release();804 824 805 825 // Update the query URL (if necessary) with the 'channel' information. -
trunk/src/VBox/Main/xml/Settings.cpp
r94643 r94685 2356 2356 pelmLevel4Child->getAttributeValue("enabled", updateHost.fEnabled); 2357 2357 pelmLevel4Child->getAttributeValue("channel", (uint32_t&)updateHost.enmChannel); 2358 pelmLevel4Child->getAttributeValue("checkFreq uency", updateHost.uCheckFreqSeconds);2358 pelmLevel4Child->getAttributeValue("checkFreqSec", updateHost.uCheckFreqSeconds); 2359 2359 pelmLevel4Child->getAttributeValue("repoUrl", updateHost.strRepoUrl); 2360 2360 pelmLevel4Child->getAttributeValue("proxyMode", (uint32_t&)updateHost.enmProxyMode); … … 2603 2603 pelmUpdateHost->setAttribute("enabled", updateHost.fEnabled); 2604 2604 pelmUpdateHost->setAttribute("channel", (int32_t)updateHost.enmChannel); 2605 pelmUpdateHost->setAttribute("checkFreq uency", updateHost.uCheckFreqSeconds);2605 pelmUpdateHost->setAttribute("checkFreqSec", updateHost.uCheckFreqSeconds); 2606 2606 if (updateHost.strRepoUrl.length()) 2607 2607 pelmUpdateHost->setAttribute("repoUrl", updateHost.strRepoUrl);
Note:
See TracChangeset
for help on using the changeset viewer.