- Timestamp:
- Dec 9, 2013 9:21:41 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp
r49824 r49826 480 480 std::string networkName = getNetwork(); 481 481 482 HRESULT hrc = virtualbox->FindDHCPServerByNetworkName(com::Bstr(networkName.c_str()).raw(), 483 m_DhcpServer.asOutParam()); 484 AssertComRCReturn(hrc, VERR_INTERNAL_ERROR); 485 486 hrc = virtualbox->FindNATNetworkByName(com::Bstr(networkName.c_str()).raw(), 487 m_NATNetwork.asOutParam()); 488 489 BOOL fNeedDhcpServer = false; 490 if (FAILED(m_NATNetwork->COMGETTER(NeedDhcpServer)(&fNeedDhcpServer))) 491 return VERR_INTERNAL_ERROR; 492 482 int rc = findDhcpServer(virtualbox, networkName, m_DhcpServer); 483 AssertRCReturn(rc, rc); 484 485 rc = findNatNetwork(virtualbox, networkName, m_NATNetwork); 486 AssertRCReturn(rc, rc); 487 488 BOOL fNeedDhcpServer = isDhcpRequired(m_NATNetwork); 493 489 if (!fNeedDhcpServer) 494 490 return VERR_CANCELLED; … … 496 492 RTNETADDRIPV4 gateway; 497 493 com::Bstr strGateway; 498 499 hrc = m_NATNetwork->COMGETTER(Gateway)(strGateway.asOutParam()); 494 HRESULT hrc = m_NATNetwork->COMGETTER(Gateway)(strGateway.asOutParam()); 500 495 AssertComRCReturn(hrc, VERR_INTERNAL_ERROR); 501 496 RTNetStrToIPv4Addr(com::Utf8Str(strGateway).c_str(), &gateway); … … 505 500 confManager->addToAddressList(RTNET_DHCP_OPT_ROUTERS, gateway); 506 501 507 intrc = fetchAndUpdateDnsInfo();502 rc = fetchAndUpdateDnsInfo(); 508 503 AssertMsgRCReturn(rc, ("Wasn't able to fetch Dns info"), rc); 509 504
Note:
See TracChangeset
for help on using the changeset viewer.