VirtualBox

Changeset 30304 in vbox for trunk


Ignore:
Timestamp:
Jun 18, 2010 10:51:15 AM (15 years ago)
Author:
vboxsync
Message:

Main: fixes to saveSettings and locking calls

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostImpl.cpp

    r29945 r30304  
    11451145    /* save the global settings */
    11461146    alock.release();
     1147    AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
    11471148    return rc = m->pParent->saveSettings();
    11481149#else
     
    12001201    /* save the global settings */
    12011202    alock.release();
     1203    AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
    12021204    return rc = m->pParent->saveSettings();
    12031205#else
     
    17631765        // save the global settings... yeah, on every single filter property change
    17641766        alock.release();
     1767        AutoWriteLock vboxLock(m->pParent COMMA_LOCKVAL_SRC_POS);
    17651768        return m->pParent->saveSettings();
    17661769    }
  • trunk/src/VBox/Main/MachineImpl.cpp

    r30298 r30304  
    31163116        alock.leave();
    31173117
    3118         rc = medium->createDiffStorage(diff, MediumVariant_Standard,
    3119                                        pMediumLockList, NULL /* aProgress */,
    3120                                        true /* aWait */, &fNeedsSaveSettings);
     3118        rc = medium->createDiffStorage(diff,
     3119                                       MediumVariant_Standard,
     3120                                       pMediumLockList,
     3121                                       NULL /* aProgress */,
     3122                                       true /* aWait */,
     3123                                       &fNeedsSaveSettings);
    31213124
    31223125        alock.enter();
     
    48724875        return setError(VBOX_E_OBJECT_IN_USE, tr("CPU %lu is already attached"), aCpu);
    48734876
    4874     alock.leave();
     4877    alock.release();
    48754878    rc = onCPUChange(aCpu, false);
    4876     alock.enter();
     4879    alock.acquire();
    48774880    if (FAILED(rc)) return rc;
    48784881
     
    48834886    /* Save settings if online */
    48844887    if (Global::IsOnline(mData->mMachineState))
    4885         SaveSettings();
     4888        saveSettings();
    48864889
    48874890    return S_OK;
     
    49134916        return setError(E_INVALIDARG, tr("It is not possible to detach CPU 0"));
    49144917
    4915     alock.leave();
     4918    alock.release();
    49164919    rc = onCPUChange(aCpu, true);
    4917     alock.enter();
     4920    alock.acquire();
    49184921    if (FAILED(rc)) return rc;
    49194922
     
    49244927    /* Save settings if online */
    49254928    if (Global::IsOnline(mData->mMachineState))
    4926         SaveSettings();
     4929        saveSettings();
    49274930
    49284931    return S_OK;
     
    1112811131            mData->mCurrentStateModified = TRUE;
    1112911132            stsFlags |= SaveSTS_CurStateModified;
    11130             SaveSettings();
     11133            SaveSettings();     // @todo r=dj why the public method? why first SaveSettings and then saveStateSettings?
    1113111134        }
    1113211135    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette