Changeset 84618 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- May 29, 2020 6:43:11 PM (5 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r82968 r84618 649 649 } 650 650 651 #ifdef VBOX_WITH_CLOUD_NET 652 { 653 ComPtr<IVirtualBox> pVirtualBox; 654 HRESULT rc = mMachine->COMGETTER(Parent)(pVirtualBox.asOutParam()); 655 AssertComRC(rc); 656 if (SUCCEEDED(rc) && !pVirtualBox.isNull()) 657 stopGateways(pVirtualBox, mGateways); 658 } 659 #endif /* VBOX_WITH_CLOUD_NET */ 651 660 LogFlowThisFunc(("initFailed()=%d\n", autoUninitSpan.initFailed())); 652 661 if (mVmListener) -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r83170 r84618 2630 2630 Assert(!macAddr.isEmpty()); 2631 2631 Utf8Str macAddrUtf8 = macAddr; 2632 #ifdef VBOX_WITH_CLOUD_NET 2633 NetworkAttachmentType_T eAttachmentType; 2634 hrc = networkAdapter->COMGETTER(AttachmentType)(&eAttachmentType); H(); 2635 if (eAttachmentType == NetworkAttachmentType_Cloud) 2636 { 2637 mGateways.setLocalMacAddress(macAddrUtf8); 2638 /* We'll insert cloud MAC later, when it becomes known. */ 2639 } 2640 else 2641 { 2642 #endif 2632 2643 char *macStr = (char*)macAddrUtf8.c_str(); 2633 2644 Assert(strlen(macStr) == 12); … … 2646 2657 } 2647 2658 InsertConfigBytes(pCfg, "MAC", &Mac, sizeof(Mac)); 2648 2659 #ifdef VBOX_WITH_CLOUD_NET 2660 } 2661 #endif 2649 2662 /* 2650 2663 * Check if the cable is supposed to be unplugged … … 4985 4998 Bstr bstr; 4986 4999 5000 #ifdef VBOX_WITH_CLOUD_NET 5001 /* We'll need device's pCfg for cloud attachments */ 5002 PCFGMNODE pDevCfg = pCfg; 5003 #endif /* VBOX_WITH_CLOUD_NET */ 5004 4987 5005 #define H() AssertLogRelMsgReturn(!FAILED(hrc), ("hrc=%Rhrc\n", hrc), VERR_MAIN_CONFIG_CONSTRUCTOR_COM_ERROR) 4988 5006 … … 5823 5841 case NetworkAttachmentType_Cloud: 5824 5842 { 5825 hrc = aNetworkAdapter->COMGETTER(CloudNetwork)(bstr.asOutParam()); H(); 5843 ComPtr<ICloudNetwork> network; 5844 hrc = aNetworkAdapter->COMGETTER(CloudNetwork)(bstr.asOutParam()); H(); 5845 hrc = pMachine->COMGETTER(Name)(mGateways.mTargetVM.asOutParam()); H(); 5846 hrc = virtualBox->FindCloudNetworkByName(bstr.raw(), network.asOutParam()); H(); 5847 hrc = startGateways(virtualBox, network, mGateways); H(); 5848 InsertConfigBytes(pDevCfg, "MAC", &mGateways.mCloudMacAddress, sizeof(mGateways.mCloudMacAddress)); 5826 5849 if (!bstr.isEmpty()) 5827 5850 {
Note:
See TracChangeset
for help on using the changeset viewer.