VirtualBox

Changeset 12953 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Oct 2, 2008 5:56:43 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37380
Message:

Main: Solaris NIC listing, make it avoid duplicates.

File:
1 edited

Legend:

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

    r12866 r12953  
    657657        return DI_WALK_CONTINUE;
    658658}
     659
     660static bool vboxSolarisSameNIC(ComObjPtr <HostNetworkInterface> Iface1, ComObjPtr <HostNetworkInterface> Iface2)
     661{
     662    Bstr Iface1Str;
     663    (*Iface1).COMGETTER(Name) (Iface1Str.asOutParam());
     664
     665    Bstr Iface2Str;
     666    (*Iface2).COMGETTER(Name) (Iface2Str.asOutParam());
     667
     668    if (Iface1Str == Iface2Str)
     669        return true;
     670
     671    return false;
     672}
     673
    659674# endif /* VBOX_SOLARIS_USE_DEVINFO */
    660675
     
    712727    if (VBoxSolarisLibDlpiFound())
    713728        g_pfnLibDlpiWalk(vboxSolarisAddLinkHostIface, &list, 0);
     729
     730    /*
     731     * Weed out duplicates caused by dlpi_walk inconsistencies across Nevadas.
     732     */
     733    list.unique(vboxSolarisSameNIC);
    714734
    715735#else
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