VirtualBox

Changeset 18853 in vbox


Ignore:
Timestamp:
Apr 9, 2009 8:16:16 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
45868
Message:

VBoxXPCOMGlue: fixed a bug in path detection logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/cbinding/VBoxXPCOMCGlue.c

    r18244 r18853  
    6969/** Pointer to VBoxGetXPCOMCFunctions for the loaded VBoxXPCOMC so/dylib/dll. */
    7070PFNVBOXGETXPCOMCFUNCTIONS g_pfnGetFunctions = NULL;
     71/** boolean for checking if the VBOX_APP_HOME is already set by the users */
     72int g_bVAHSet = 0;
    7173
    7274
     
    103105     * Then resolve and call the function table getter.
    104106     */
    105     setenv("VBOX_APP_HOME", pszHome, 0 /* no need to overwrite */);
     107    if (!g_bVAHSet)
     108    {
     109        /* Override it as we know that user didn't set it
     110         * and that we only did it in previous iteration
     111         */
     112        setenv("VBOX_APP_HOME", pszHome, 1);
     113    }
    106114    g_hVBoxXPCOMC = dlopen(szBuf, RTLD_NOW | RTLD_LOCAL);
    107115    if (g_hVBoxXPCOMC)
     
    155163    const char *pszHome = getenv("VBOX_APP_HOME");
    156164    if (pszHome)
     165    {
     166        g_bVAHSet = 1;
    157167        return tryLoadOne(pszHome);
     168    }
    158169
    159170    /*
Note: See TracChangeset for help on using the changeset viewer.

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