Changeset 54314 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Feb 19, 2015 9:32:18 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 98389
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r52959 r54314 1346 1346 if ( pelmServer->getAttributeValue("networkName", srv.strNetworkName) 1347 1347 && pelmServer->getAttributeValue("IPAddress", srv.strIPAddress) 1348 && pelmServer->getAttributeValue("networkMask", srv.GlobalDhcpOptions[DhcpOpt_SubnetMask] )1348 && pelmServer->getAttributeValue("networkMask", srv.GlobalDhcpOptions[DhcpOpt_SubnetMask].text) 1349 1349 && pelmServer->getAttributeValue("lowerIP", srv.strIPLower) 1350 1350 && pelmServer->getAttributeValue("upperIP", srv.strIPUpper) … … 1385 1385 { 1386 1386 DhcpOpt_T OptName; 1387 com::Utf8Str OptValue; 1387 com::Utf8Str OptText; 1388 int32_t OptEnc = DhcpOptValue::LEGACY; 1389 1388 1390 opt->getAttributeValue("name", (uint32_t&)OptName); 1389 1391 … … 1391 1393 continue; 1392 1394 1393 opt->getAttributeValue("value", OptValue); 1394 1395 map.insert(std::map<DhcpOpt_T, Utf8Str>::value_type(OptName, OptValue)); 1395 opt->getAttributeValue("value", OptText); 1396 opt->getAttributeValue("encoding", OptEnc); 1397 1398 map[OptName] = DhcpOptValue(OptText, (DhcpOptValue::Encoding)OptEnc); 1396 1399 } /* end of forall("Option") */ 1397 1400 … … 1535 1538 #endif 1536 1539 srv.strIPAddress = "192.168.56.100"; 1537 srv.GlobalDhcpOptions[DhcpOpt_SubnetMask] = "255.255.255.0";1540 srv.GlobalDhcpOptions[DhcpOpt_SubnetMask] = DhcpOptValue("255.255.255.0"); 1538 1541 srv.strIPLower = "192.168.56.101"; 1539 1542 srv.strIPUpper = "192.168.56.254"; … … 1597 1600 pelmThis->setAttribute("IPAddress", d.strIPAddress); 1598 1601 if (itOpt != d.GlobalDhcpOptions.end()) 1599 pelmThis->setAttribute("networkMask", itOpt->second );1602 pelmThis->setAttribute("networkMask", itOpt->second.text); 1600 1603 pelmThis->setAttribute("lowerIP", d.strIPLower); 1601 1604 pelmThis->setAttribute("upperIP", d.strIPUpper); … … 1622 1625 1623 1626 pelmOpt->setAttribute("name", itOpt->first); 1624 pelmOpt->setAttribute("value", itOpt->second); 1627 pelmOpt->setAttribute("value", itOpt->second.text); 1628 if (itOpt->second.encoding != DhcpOptValue::LEGACY) 1629 pelmOpt->setAttribute("encoding", (int)itOpt->second.encoding); 1625 1630 } 1626 1631 } /* end of if */ … … 1644 1649 xml::ElementNode *pelmOpt = pelmCfg->createChild("Option"); 1645 1650 pelmOpt->setAttribute("name", itOpt1->first); 1646 pelmOpt->setAttribute("value", itOpt1->second); 1651 pelmOpt->setAttribute("value", itOpt1->second.text); 1652 if (itOpt1->second.encoding != DhcpOptValue::LEGACY) 1653 pelmOpt->setAttribute("encoding", (int)itOpt1->second.encoding); 1647 1654 } 1648 1655 }
Note:
See TracChangeset
for help on using the changeset viewer.