VirtualBox

Ignore:
Timestamp:
Apr 7, 2009 2:55:12 PM (16 years ago)
Author:
vboxsync
Message:

Main: INetworkAdapter separate properties for hostonly & bridged interface names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetworkDetails.cpp

    r18733 r18826  
    7676    if (!intName.isEmpty())
    7777        setProperty ("INT_Name", QVariant (intName));
    78     QString ifsName (mAdapter.GetHostInterface());
    79     CHostNetworkInterface ifs =
    80         vboxGlobal().virtualBox().GetHost().FindHostNetworkInterfaceByName (ifsName);
    81     if (!ifs.isNull() && ifs.GetInterfaceType() == KHostNetworkInterfaceType_Bridged)
    82         setProperty ("BRG_Name", QVariant (ifsName));
    83     else if (!ifs.isNull() && ifs.GetInterfaceType() == KHostNetworkInterfaceType_HostOnly)
    84         setProperty ("HOI_Name", QVariant (ifsName));
     78    QString bridgedIfName (mAdapter.GetBridgedInterface());
     79    CHostNetworkInterface bridgedIf =
     80        vboxGlobal().virtualBox().GetHost().FindHostNetworkInterfaceByName (bridgedIfName);
     81    if (!bridgedIf.isNull() && bridgedIf.GetInterfaceType() == KHostNetworkInterfaceType_Bridged)
     82        setProperty ("BRG_Name", QVariant (bridgedIfName));
     83
     84    QString hostonlyIfName (mAdapter.GetHostOnlyInterface());
     85    CHostNetworkInterface hostonlyIf =
     86        vboxGlobal().virtualBox().GetHost().FindHostNetworkInterfaceByName (hostonlyIfName);
     87    if (!hostonlyIf.isNull() && hostonlyIf.GetInterfaceType() == KHostNetworkInterfaceType_HostOnly)
     88        setProperty ("HOI_Name", QVariant (hostonlyIfName));
    8589
    8690    /* Load common settings */
     
    96100    {
    97101        case KNetworkAttachmentType_Bridged:
    98             mAdapter.SetHostInterface (name);
     102            mAdapter.SetBridgedInterface (name);
    99103            break;
    100104        case KNetworkAttachmentType_Internal:
     
    102106            break;
    103107        case KNetworkAttachmentType_HostOnly:
    104             mAdapter.SetHostInterface (name);
     108            mAdapter.SetHostOnlyInterface (name);
    105109            break;
    106110        default:
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