VirtualBox

Ignore:
Timestamp:
Mar 29, 2010 4:04:55 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59453
Message:

Main: attempt at USB locking fixes

File:
1 edited

Legend:

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

    r27792 r27796  
    748748{
    749749    TaskOVF(Appliance *aThat)
    750       : pAppliance(aThat)
    751       , rc(S_OK) {}
     750      : pAppliance(aThat),
     751        rc(S_OK)
     752    {}
    752753
    753754    static int updateProgress(unsigned uPercent, void *pvUser);
     
    759760};
    760761
    761 struct Appliance::TaskImportOVF: Appliance::TaskOVF
     762struct Appliance::TaskImportOVF : Appliance::TaskOVF
    762763{
    763764    enum TaskType
     
    768769
    769770    TaskImportOVF(Appliance *aThat)
    770         : TaskOVF(aThat)
    771         , taskType(Read) {}
     771        : TaskOVF(aThat),
     772          taskType(Read)
     773    {}
    772774
    773775    int startThread();
     
    776778};
    777779
    778 struct Appliance::TaskExportOVF: Appliance::TaskOVF
     780struct Appliance::TaskExportOVF : Appliance::TaskOVF
    779781{
    780782    enum OVFFormat
     
    790792
    791793    TaskExportOVF(Appliance *aThat)
    792         : TaskOVF(aThat)
    793         , taskType(Write) {}
     794        : TaskOVF(aThat),
     795          taskType(Write)
     796    {}
    794797
    795798    int startThread();
     
    813816    Appliance::TaskOVF* pTask = *(Appliance::TaskOVF**)pvUser;
    814817
    815     if (pTask &&
    816         !pTask->progress.isNull())
     818    if (    pTask
     819         && !pTask->progress.isNull())
    817820    {
    818821        BOOL fCanceled;
     
    871874}
    872875
     876/**
     877 * Implementation of the import code. This gets called from the public Appliance::ImportMachines()
     878 * method as well as Appliance::importS3().
     879 * @param aLocInfo
     880 * @param aProgress
     881 * @return
     882 */
    873883HRESULT Appliance::importImpl(const LocationInfo &aLocInfo, ComObjPtr<Progress> &aProgress)
    874884{
     
    39563966    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    39573967
     3968    // do not allow entering this method if the appliance is busy reading or writing
    39583969    if (!isApplianceIdle())
    39593970        return E_ACCESSDENIED;
     
    39894000
    39904001    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    3991 
    3992     if (!isApplianceIdle())
    3993         return E_ACCESSDENIED;
    39944002
    39954003    ComObjPtr<VFSExplorer> explorer;
     
    40274035    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    40284036
     4037    // do not allow entering this method if the appliance is busy reading or writing
    40294038    if (!isApplianceIdle())
    40304039        return E_ACCESSDENIED;
     
    40794088
    40804089    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    4081 
    4082     if (!isApplianceIdle())
    4083         return E_ACCESSDENIED;
    40844090
    40854091    com::SafeArray<BSTR> sfaWarnings(m->llWarnings.size());
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