Changeset 21817 in vbox for trunk/src/VBox/Main/ConsoleImpl.cpp
- Timestamp:
- Jul 27, 2009 2:52:56 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50430
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r21787 r21817 3294 3294 HRESULT rc; 3295 3295 NetworkAttachmentType_T eAttachmentType; 3296 Bstr eHostInterface; 3297 Bstr eInternalNetwork; 3296 3298 3297 3299 rc = aNetworkAdapter->COMGETTER (AttachmentType) (&eAttachmentType); 3300 ComAssertComRCRetRC (rc); 3301 rc = aNetworkAdapter->COMGETTER (HostInterface) (eHostInterface.asOutParam()); 3302 ComAssertComRCRetRC (rc); 3303 rc = aNetworkAdapter->COMGETTER (InternalNetwork) (eInternalNetwork.asOutParam()); 3298 3304 ComAssertComRCRetRC (rc); 3299 3305 #endif /* VBOX_DYNAMIC_NET_ATTACH */ … … 3354 3360 #ifdef VBOX_DYNAMIC_NET_ATTACH 3355 3361 if (VBOX_SUCCESS (vrc)) 3356 rc = doNetworkAdapterChange(pszAdapterName, ulInstance, 0, aNetworkAdapter); 3362 { 3363 bool changeAdaptor = false; 3364 3365 if (!( (eAttachmentType == NetworkAttachmentType_Null) && 3366 (meAttachmentType[ulInstance] == NetworkAttachmentType_Null))) 3367 changeAdaptor = true; 3368 3369 /* @todo r=pritesh Need to check for mNATNetwork as well here 3370 * when NAT is shifted to use IntNet, till then just compare 3371 * if the current and next attachment types are not same 3372 */ 3373 if (!( (eAttachmentType == NetworkAttachmentType_NAT) && 3374 (meAttachmentType[ulInstance] == NetworkAttachmentType_NAT))) 3375 changeAdaptor = true; 3376 3377 if (!( (eAttachmentType == NetworkAttachmentType_Bridged) && 3378 (meAttachmentType[ulInstance] == NetworkAttachmentType_Bridged) && 3379 (mHostInterface[ulInstance] == eHostInterface))) 3380 changeAdaptor = true; 3381 3382 if (!( (eAttachmentType == NetworkAttachmentType_HostOnly) && 3383 (meAttachmentType[ulInstance] == NetworkAttachmentType_HostOnly) && 3384 (mHostInterface[ulInstance] == eHostInterface))) 3385 changeAdaptor = true; 3386 3387 if (!( (eAttachmentType == NetworkAttachmentType_Internal) && 3388 (meAttachmentType[ulInstance] == NetworkAttachmentType_Internal) && 3389 (mInternalNetwork[ulInstance] == eInternalNetwork))) 3390 changeAdaptor = true; 3391 3392 if (changeAdaptor) 3393 rc = doNetworkAdapterChange(pszAdapterName, ulInstance, 0, aNetworkAdapter); 3394 } 3357 3395 #endif /* VBOX_DYNAMIC_NET_ATTACH */ 3358 3396 … … 7636 7674 */ 7637 7675 NetworkAttachmentType_T Console::meAttachmentType[] = {}; 7676 #ifdef VBOX_DYNAMIC_NET_ATTACH 7677 Bstr Console::mHostInterface[]; 7678 Bstr Console::mInternalNetwork[]; 7679 Bstr Console::mNATNetwork[]; 7680 #endif 7638 7681 7639 7682 /* vi: set tabstop=4 shiftwidth=4 expandtab: */
Note:
See TracChangeset
for help on using the changeset viewer.