Changeset 54696 in vbox for trunk/src/VBox
- Timestamp:
- Mar 9, 2015 1:03:59 PM (10 years ago)
- Location:
- trunk/src/VBox/NetworkServices
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/DHCP/Config.cpp
r54584 r54696 219 219 xml::NodesLoop leases(*root); 220 220 221 bool valueExists;222 221 const xml::ElementNode *lease; 223 222 while ((lease = leases.forAllNodes())) … … 1406 1405 bool Lease::toXML(xml::ElementNode *node) const 1407 1406 { 1408 bool valueAddition = node->setAttribute(tagXMLLeaseAttributeMac.c_str(), com::Utf8StrFmt("%RTmac", &m->m_mac)); 1409 if (!valueAddition) return false; 1410 1411 valueAddition = node->setAttribute(tagXMLLeaseAttributeNetwork.c_str(), com::Utf8StrFmt("%RTnaipv4", m->m_network)); 1412 if (!valueAddition) return false; 1413 1414 xml::ElementNode *address = node->createChild(tagXMLLeaseAddress.c_str()); 1415 if (!address) return false; 1416 1417 valueAddition = address->setAttribute(tagXMLAddressAttributeValue.c_str(), com::Utf8StrFmt("%RTnaipv4", m->m_address)); 1418 if (!valueAddition) return false; 1419 1420 xml::ElementNode *time = node->createChild(tagXMLLeaseTime.c_str()); 1421 if (!time) return false; 1422 1423 valueAddition = time->setAttribute(tagXMLTimeAttributeIssued.c_str(), 1424 m->u64TimestampLeasingStarted); 1425 if (!valueAddition) return false; 1426 1427 valueAddition = time->setAttribute(tagXMLTimeAttributeExpiration.c_str(), 1428 m->u32LeaseExpirationPeriod); 1429 if (!valueAddition) return false; 1407 xml::AttributeNode *pAttribNode = node->setAttribute(tagXMLLeaseAttributeMac.c_str(), 1408 com::Utf8StrFmt("%RTmac", &m->m_mac)); 1409 if (!pAttribNode) 1410 return false; 1411 1412 pAttribNode = node->setAttribute(tagXMLLeaseAttributeNetwork.c_str(), 1413 com::Utf8StrFmt("%RTnaipv4", m->m_network)); 1414 if (!pAttribNode) 1415 return false; 1416 1417 xml::ElementNode *pLeaseAddress = node->createChild(tagXMLLeaseAddress.c_str()); 1418 if (!pLeaseAddress) 1419 return false; 1420 1421 pAttribNode = pLeaseAddress->setAttribute(tagXMLAddressAttributeValue.c_str(), 1422 com::Utf8StrFmt("%RTnaipv4", m->m_address)); 1423 if (!pAttribNode) 1424 return false; 1425 1426 xml::ElementNode *pLeaseTime = node->createChild(tagXMLLeaseTime.c_str()); 1427 if (!pLeaseTime) 1428 return false; 1429 1430 pAttribNode = pLeaseTime->setAttribute(tagXMLTimeAttributeIssued.c_str(), 1431 m->u64TimestampLeasingStarted); 1432 if (!pAttribNode) 1433 return false; 1434 1435 pAttribNode = pLeaseTime->setAttribute(tagXMLTimeAttributeExpiration.c_str(), 1436 m->u32LeaseExpirationPeriod); 1437 if (!pAttribNode) 1438 return false; 1430 1439 1431 1440 return true; -
trunk/src/VBox/NetworkServices/NetLib/ComHostUtils.cpp
r50213 r54696 79 79 80 80 ComBstrArray strs; 81 int cStrs;81 size_t cStrs; 82 82 HRESULT hrc = nat->COMGETTER(LocalMappings)(ComSafeArrayAsOutParam(strs)); 83 83 if ( SUCCEEDED(hrc) 84 84 && (cStrs = strs.size())) 85 85 { 86 for ( int i = 0; i < cStrs; ++i)86 for (size_t i = 0; i < cStrs; ++i) 87 87 { 88 88 char szAddr[17]; -
trunk/src/VBox/NetworkServices/NetLib/utils.h
r50213 r54696 40 40 return false; 41 41 42 return fNeedDhcpServer;42 return RT_BOOL(fNeedDhcpServer); 43 43 } 44 44
Note:
See TracChangeset
for help on using the changeset viewer.