Changeset 67804 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jul 5, 2017 2:53:27 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116727
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
r67792 r67804 487 487 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 488 488 489 if (mData->strBridgedName != aBridgedInterface) 489 Bstr canonicalName = aBridgedInterface; 490 #ifdef RT_OS_DARWIN 491 com::SafeIfaceArray<IHostNetworkInterface> hostNetworkInterfaces; 492 ComPtr<IHost> host; 493 HRESULT rc = mParent->i_getVirtualBox()->COMGETTER(Host)(host.asOutParam()); 494 if (SUCCEEDED(rc)) 495 { 496 host->FindHostNetworkInterfacesOfType(HostNetworkInterfaceType_Bridged, 497 ComSafeArrayAsOutParam(hostNetworkInterfaces)); 498 for (size_t i = 0; i < hostNetworkInterfaces.size(); ++i) 499 { 500 Bstr shortName; 501 ComPtr<IHostNetworkInterface> ni = hostNetworkInterfaces[i]; 502 ni->COMGETTER(ShortName)(shortName.asOutParam()); 503 if (shortName == aBridgedInterface) 504 { 505 ni->COMGETTER(Name)(canonicalName.asOutParam()); 506 break; 507 } 508 } 509 } 510 #endif /* RT_OS_DARWIN */ 511 if (Bstr(mData->strBridgedName) != canonicalName) 490 512 { 491 513 /* if an empty/null string is to be set, bridged interface must be 492 514 * turned off */ 493 if ( aBridgedInterface.isEmpty()515 if (canonicalName.isEmpty() 494 516 && mData->mode == NetworkAttachmentType_Bridged) 495 517 { … … 499 521 500 522 mData.backup(); 501 mData->strBridgedName = aBridgedInterface;523 mData->strBridgedName = canonicalName; 502 524 503 525 // leave the lock before informing callbacks
Note:
See TracChangeset
for help on using the changeset viewer.