VirtualBox

Changeset 31467 in vbox


Ignore:
Timestamp:
Aug 9, 2010 9:29:25 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
64549
Message:

Main: settings: bumpSettingsVersionIfNeeded(): fix broken 1.11 check for network settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r31466 r31467  
    41504150    if (m->sv < SettingsVersion_v1_11)
    41514151    {
    4152         // VirtualBox 3.3 adds support for HD audio
    4153         if (hardwareMachine.audioAdapter.controllerType == AudioControllerType_HDA)
    4154             m->sv = SettingsVersion_v1_11;
    4155 
    4156         // VirtualBox 3.3 adds support for CPU priority
    4157         if (hardwareMachine.ulCpuPriority != 100)
    4158             m->sv = SettingsVersion_v1_11;
    4159 
    4160         // .. and we now have per-machine media registries
    4161         if (    mediaRegistry.llHardDisks.size()
     4152        // VirtualBox 3.3 adds HD audio, CPU priorities and per-machine media registries
     4153        if (    hardwareMachine.audioAdapter.controllerType == AudioControllerType_HDA
     4154             || hardwareMachine.ulCpuPriority != 100
     4155             || mediaRegistry.llHardDisks.size()
    41624156             || mediaRegistry.llDvdImages.size()
    41634157             || mediaRegistry.llFloppyImages.size()
     
    41744168             ++netit)
    41754169        {
    4176             if (netit->ulBandwidthLimit)
     4170            if (    (m->sv < SettingsVersion_v1_11)
     4171                 && (netit->ulBandwidthLimit)
     4172               )
    41774173            {
    41784174                /* New in VirtualBox 3.3 */
     
    41804176                break;
    41814177            }
    4182 
    4183             if (    netit->fEnabled
    4184                  && netit->mode == NetworkAttachmentType_NAT
    4185                  && (   netit->nat.u32Mtu != 0
    4186                      || netit->nat.u32SockRcv != 0
    4187                      || netit->nat.u32SockSnd != 0
    4188                      || netit->nat.u32TcpRcv != 0
    4189                      || netit->nat.u32TcpSnd != 0
    4190                      || !netit->nat.fDnsPassDomain
    4191                      || netit->nat.fDnsProxy
    4192                      || netit->nat.fDnsUseHostResolver
    4193                      || netit->nat.fAliasLog
    4194                      || netit->nat.fAliasProxyOnly
    4195                      || netit->nat.fAliasUseSamePorts
    4196                      || netit->nat.strTftpPrefix.length()
    4197                      || netit->nat.strTftpBootFile.length()
    4198                      || netit->nat.strTftpNextServer.length()
    4199                      || netit->nat.llRules.size())
    4200                 )
     4178            else if (    (m->sv < SettingsVersion_v1_10)
     4179                      && (netit->fEnabled)
     4180                      && (netit->mode == NetworkAttachmentType_NAT)
     4181                      && (   netit->nat.u32Mtu != 0
     4182                          || netit->nat.u32SockRcv != 0
     4183                          || netit->nat.u32SockSnd != 0
     4184                          || netit->nat.u32TcpRcv != 0
     4185                          || netit->nat.u32TcpSnd != 0
     4186                          || !netit->nat.fDnsPassDomain
     4187                          || netit->nat.fDnsProxy
     4188                          || netit->nat.fDnsUseHostResolver
     4189                          || netit->nat.fAliasLog
     4190                          || netit->nat.fAliasProxyOnly
     4191                          || netit->nat.fAliasUseSamePorts
     4192                          || netit->nat.strTftpPrefix.length()
     4193                          || netit->nat.strTftpBootFile.length()
     4194                          || netit->nat.strTftpNextServer.length()
     4195                          || netit->nat.llRules.size()
     4196                         )
     4197                     )
    42014198            {
    42024199                m->sv = SettingsVersion_v1_10;
    4203                 break;
    4204             }
    4205             if (    netit->fEnabled
    4206                  && netit->ulBootPriority != 0)
     4200                // no break because we still might need v1.11 above
     4201            }
     4202            else if (    (m->sv < SettingsVersion_v1_10)
     4203                      && (netit->fEnabled)
     4204                      && (netit->ulBootPriority != 0)
     4205                    )
    42074206            {
    42084207                m->sv = SettingsVersion_v1_10;
    4209                 break;
     4208                // no break because we still might need v1.11 above
    42104209            }
    42114210        }
     
    42194218
    42204219        // VirtualBox 3.2 adds support for VRDP video channel
    4221         if (hardwareMachine.vrdpSettings.fVideoChannel)
     4220        else if (hardwareMachine.vrdpSettings.fVideoChannel)
    42224221            m->sv = SettingsVersion_v1_10;
    42234222    }
     
    43344333       )
    43354334        m->sv = SettingsVersion_v1_4;
    4336 
    4337 
    4338 
    43394335}
    43404336
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette