VirtualBox

Changeset 67728 in vbox


Ignore:
Timestamp:
Jun 30, 2017 12:27:58 PM (7 years ago)
Author:
vboxsync
Message:

SystemPropertiesImpl: added i_getDefaultAdditionsISO so I don't need to go thru the COMGETTER/string conversion fun.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r62485 r67728  
    5555    int i_loadVDPlugin(const char *pszPluginLibrary);
    5656    int i_unloadVDPlugin(const char *pszPluginLibrary);
     57
     58    HRESULT i_getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO);
    5759
    5860private:
  • trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp

    r65103 r67728  
    928928HRESULT SystemProperties::getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO)
    929929{
    930     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    931 
    932     if (m->strDefaultAdditionsISO.isEmpty())
    933     {
    934         /* no guest additions, check if it showed up in the mean time */
    935         alock.release();
    936         {
    937             AutoWriteLock wlock(this COMMA_LOCKVAL_SRC_POS);
    938             ErrorInfoKeeper eik;
    939             (void)setDefaultAdditionsISO("");
    940         }
    941         alock.acquire();
    942     }
    943     aDefaultAdditionsISO = m->strDefaultAdditionsISO;
    944 
    945     return S_OK;
     930    return i_getDefaultAdditionsISO(aDefaultAdditionsISO);
    946931}
    947932
     
    11481133{
    11491134    return VDPluginUnloadFromFilename(pszPluginLibrary);
     1135}
     1136
     1137/**
     1138 * Internally usable version of getDefaultAdditionsISO.
     1139 */
     1140HRESULT SystemProperties::i_getDefaultAdditionsISO(com::Utf8Str &aDefaultAdditionsISO)
     1141{
     1142    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     1143    if (m->strDefaultAdditionsISO.isEmpty())
     1144    {
     1145        /* no guest additions, check if it showed up in the mean time */
     1146        alock.release();
     1147        AutoWriteLock wlock(this COMMA_LOCKVAL_SRC_POS);
     1148        if (m->strDefaultAdditionsISO.isEmpty())
     1149        {
     1150            ErrorInfoKeeper eik;
     1151            (void)setDefaultAdditionsISO("");
     1152        }
     1153        alock.acquire();
     1154    }
     1155    aDefaultAdditionsISO = m->strDefaultAdditionsISO;
     1156    return S_OK;
    11501157}
    11511158
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