Changeset 38695 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Sep 9, 2011 6:25:57 AM (13 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp
r38406 r38695 456 456 m.realIPAddress = ip; 457 457 m.realNetworkMask = mask; 458 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(), Bstr(aIPAddress).raw()))) 458 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(), 459 Bstr(aIPAddress).raw()))) 459 460 return E_FAIL; 460 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw()).raw(), Bstr(aNetMask).raw()))) 461 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw()).raw(), 462 Bstr(aNetMask).raw()))) 461 463 return E_FAIL; 462 464 return S_OK; … … 502 504 m.realIPV6Address = aIPV6Address; 503 505 m.realIPV6PrefixLength = aIPV6MaskPrefixLength; 504 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPV6Address", mInterfaceName.raw()).raw(), Bstr(aIPV6Address).raw()))) 506 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPV6Address", mInterfaceName.raw()).raw(), 507 Bstr(aIPV6Address).raw()))) 505 508 return E_FAIL; 506 509 if (FAILED(mVBox->SetExtraData(BstrFmt("HostOnly/%ls/IPV6NetMask", mInterfaceName.raw()).raw(), … … 561 564 { 562 565 Bstr tmpAddr, tmpMask; 563 HRESULT hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(), tmpAddr.asOutParam());564 hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw()).raw(), tmpMask.asOutParam());565 if ( tmpAddr.isEmpty())566 HRESULT hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPAddress", mInterfaceName.raw()).raw(), 567 tmpAddr.asOutParam()); 568 if (FAILED(hrc) || tmpAddr.isEmpty()) 566 569 tmpAddr = getDefaultIPv4Address(mInterfaceName); 567 570 568 if (tmpMask.isEmpty()) 571 hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", mInterfaceName.raw()).raw(), 572 tmpMask.asOutParam()); 573 if (FAILED(hrc) || tmpMask.isEmpty()) 569 574 tmpMask = Bstr(VBOXNET_IPV4MASK_DEFAULT); 570 575 … … 576 581 { 577 582 Bstr tmpPrefixLen; 578 HRESULT hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPV6Address", mInterfaceName.raw()).raw(), m.IPV6Address.asOutParam()); 579 if (!m.IPV6Address.isEmpty()) 583 HRESULT hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPV6Address", mInterfaceName.raw()).raw(), 584 m.IPV6Address.asOutParam()); 585 if (SUCCEEDED(hrc) && !m.IPV6Address.isEmpty()) 580 586 { 581 hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPV6PrefixLen", mInterfaceName.raw()).raw(), tmpPrefixLen.asOutParam()); 587 hrc = mVBox->GetExtraData(BstrFmt("HostOnly/%ls/IPV6PrefixLen", mInterfaceName.raw()).raw(), 588 tmpPrefixLen.asOutParam()); 582 589 if (SUCCEEDED(hrc) && !tmpPrefixLen.isEmpty()) 583 590 m.IPV6NetworkMaskPrefixLength = Utf8Str(tmpPrefixLen).toUInt32(); -
trunk/src/VBox/Main/src-server/MediumImpl.cpp
r38641 r38695 1765 1765 { 1766 1766 CheckComArgOutSafeArrayPointerValid(aAllowedTypes); 1767 NOREF(aAllowedTypes); NOREF(aAllowedTypesSize); 1767 1768 1768 1769 AutoCaller autoCaller(this);
Note:
See TracChangeset
for help on using the changeset viewer.