Changeset 48538 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Sep 19, 2013 3:17:43 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 89083
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r48408 r48538 2422 2422 } 2423 2423 } 2424 else if (elmMode.nameEquals("NATNetwork")) 2425 { 2426 enmAttachmentType = NetworkAttachmentType_NATNetwork; 2427 2428 if (!elmMode.getAttributeValue("name", nic.strNATNetworkName)) // required network name 2429 throw ConfigFileError(this, &elmMode, N_("Required NATNetwork/@name element is missing")); 2430 } 2424 2431 else if (elmMode.nameEquals("VDE")) 2425 2432 { … … 4460 4467 if (nic.mode != NetworkAttachmentType_Generic) 4461 4468 buildNetworkXML(NetworkAttachmentType_Generic, *pelmDisabledNode, false, nic); 4469 if (nic.mode != NetworkAttachmentType_NATNetwork) 4470 buildNetworkXML(NetworkAttachmentType_NATNetwork, *pelmDisabledNode, false, nic); 4462 4471 buildNetworkXML(nic.mode, *pelmAdapter, true, nic); 4463 4472 } … … 4772 4781 } 4773 4782 } 4783 break; 4784 4785 case NetworkAttachmentType_NATNetwork: 4786 if (fEnabled || !nic.strNATNetworkName.isEmpty()) 4787 elmParent.createChild("NATNetwork")->setAttribute("name", nic.strNATNetworkName); 4774 4788 break; 4775 4789 … … 5319 5333 { 5320 5334 // VirtualBox 4.3 adds default frontend setting, graphics controller 5321 // setting, explicit long mode setting and video capturing.5335 // setting, explicit long mode setting, video capturing and NAT networking. 5322 5336 if ( !hardwareMachine.strDefaultFrontend.isEmpty() 5323 5337 || hardwareMachine.graphicsControllerType != GraphicsControllerType_VBoxVGA … … 5325 5339 || machineUserData.ovIcon.length() > 0 5326 5340 || hardwareMachine.fVideoCaptureEnabled) 5341 { 5327 5342 m->sv = SettingsVersion_v1_14; 5343 return; 5344 } 5345 NetworkAdaptersList::const_iterator netit; 5346 for (netit = hardwareMachine.llNetworkAdapters.begin(); 5347 netit != hardwareMachine.llNetworkAdapters.end(); 5348 ++netit) 5349 { 5350 if (netit->mode == NetworkAttachmentType_NATNetwork) 5351 { 5352 m->sv = SettingsVersion_v1_14; 5353 break; 5354 } 5355 } 5328 5356 } 5329 5357
Note:
See TracChangeset
for help on using the changeset viewer.