VirtualBox

Changeset 22455 in vbox


Ignore:
Timestamp:
Aug 26, 2009 8:32:32 AM (15 years ago)
Author:
vboxsync
Message:

ConsoleImpl: meAttachmentType shouldn't be static

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

Legend:

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

    r22434 r22455  
    243243    , mVMStateChangeCallbackDisabled (false)
    244244    , mMachineState (MachineState_PoweredOff)
    245 {}
     245{
     246    for (ULONG slot = 0; slot < SchemaDefs::NetworkAdapterCount; slot ++)
     247        meAttachmentType[slot] = NetworkAttachmentType_Null;
     248}
    246249
    247250Console::~Console()
     
    76807683};
    76817684
    7682 /**
    7683  * Initializing the attachment type for the network adapters
    7684  */
    7685 NetworkAttachmentType_T Console::meAttachmentType[] = {};
    7686 
    76877685/* vi: set tabstop=4 shiftwidth=4 expandtab: */
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r22396 r22455  
    21272127    {
    21282128        const char *pszNetDriver = "IntNet";
    2129         if (meAttachmentType[uInstance] == NetworkAttachmentType_NAT)
     2129        if (pThis->meAttachmentType[uInstance] == NetworkAttachmentType_NAT)
    21302130            pszNetDriver = "NAT";
    21312131#if !defined(VBOX_WITH_NETFLT) && defined(RT_OS_LINUX)
    2132         if (meAttachmentType[uInstance] == NetworkAttachmentType_Bridged)
     2132        if (pThis->meAttachmentType[uInstance] == NetworkAttachmentType_Bridged)
    21332133            pszNetDriver = "HostInterface";
    21342134#endif
     
    28532853    }
    28542854
    2855     meAttachmentType[uInstance] = eAttachmentType;
     2855    pThis->meAttachmentType[uInstance] = eAttachmentType;
    28562856
    28572857#undef STR_FREE
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r22396 r22455  
    564564     * change the network attachment dynamically.
    565565     */
    566     static NetworkAttachmentType_T meAttachmentType[SchemaDefs::NetworkAdapterCount];
     566    NetworkAttachmentType_T meAttachmentType[SchemaDefs::NetworkAdapterCount];
    567567
    568568    VMMDev * const mVMMDev;
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