Changeset 39563 in vbox
- Timestamp:
- Dec 9, 2011 8:46:55 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 75317
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r39511 r39563 9034 9034 9035 9035 /* Network adapters (required) */ 9036 uint32_t uMaxNICs = RT_MIN(getMaxNetworkAdapters(mHWData->mChipsetType), mNetworkAdapters.size()); 9036 9037 data.llNetworkAdapters.clear(); 9037 for (ULONG slot = 0; slot < mNetworkAdapters.size(); ++slot) 9038 /* Write out only the nominal number of network adapters for this 9039 * chipset type. Since Machine::commit() hasn't been called there 9040 * may be extra NIC settings in the vector. */ 9041 for (ULONG slot = 0; slot < uMaxNICs; ++slot) 9038 9042 { 9039 9043 settings::NetworkAdapter nic; 9040 9044 nic.ulSlot = slot; 9041 rc = mNetworkAdapters[slot]->saveSettings(nic); 9042 if (FAILED(rc)) throw rc; 9043 9044 data.llNetworkAdapters.push_back(nic); 9045 /* paranoia check... must not be NULL, but must not crash either. */ 9046 if (mNetworkAdapters[slot]) 9047 { 9048 rc = mNetworkAdapters[slot]->saveSettings(nic); 9049 if (FAILED(rc)) throw rc; 9050 9051 data.llNetworkAdapters.push_back(nic); 9052 } 9045 9053 } 9046 9054 … … 10422 10430 mBandwidthControl->commit(); 10423 10431 10432 /* Keep the original network adapter count until this point, so that 10433 * discarding a chipset type change will not lose settings. */ 10424 10434 mNetworkAdapters.resize(Global::getMaxNetworkAdapters(mHWData->mChipsetType)); 10425 10435 for (ULONG slot = 0; slot < mNetworkAdapters.size(); slot++)
Note:
See TracChangeset
for help on using the changeset viewer.