Changeset 48968 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 8, 2013 10:45:30 AM (11 years ago)
- Location:
- trunk/src/VBox/Main/src-server
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r48879 r48968 12835 12835 { 12836 12836 Bstr name; 12837 12838 12837 hrc = mNetworkAdapters[slot]->COMGETTER(NATNetwork)(name.asOutParam()); 12839 12838 if (SUCCEEDED(hrc)) 12840 12839 { 12840 LogRel(("VM '%s' starts using NAT network '%ls'\n", 12841 mUserData->s.strName.c_str(), name.raw())); 12841 12842 aMachine->lockHandle()->unlockWrite(); 12842 12843 mParent->natNetworkRefInc(name.raw()); … … 13063 13064 { 13064 13065 multilock.release(); 13066 LogRel(("VM '%s' stops using NAT network '%ls'\n", 13067 mUserData->s.strName.c_str(), name.raw())); 13065 13068 mParent->natNetworkRefDec(name.raw()); 13066 13069 multilock.acquire(); -
trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp
r48955 r48968 1604 1604 && state == MachineState_Running) 1605 1605 { 1606 int natCount; 1607 1608 natCount = mParent->getVirtualBox()->natNetworkRefDec(mData->mNATNetwork.raw()); 1606 Bstr bstrName; 1607 hrc = mParent->COMGETTER(Name)(bstrName.asOutParam()); 1608 LogRel(("VM '%ls' stops using NAT network '%ls'\n", bstrName.raw(), mData->mNATNetwork.raw())); 1609 int natCount = mParent->getVirtualBox()->natNetworkRefDec(mData->mNATNetwork.raw()); 1609 1610 if (natCount == -1) 1610 1611 return E_INVALIDARG; /* no such network */ … … 1626 1627 if (state == MachineState_Running) 1627 1628 { 1628 int natCount; 1629 1630 natCount = mParent->getVirtualBox()->natNetworkRefInc(aNatNetworkName); 1629 Bstr bstrName; 1630 hrc = mParent->COMGETTER(Name)(bstrName.asOutParam()); 1631 LogRel(("VM '%ls' starts using NAT network '%ls'\n", bstrName.raw(), aNatNetworkName)); 1632 int natCount = mParent->getVirtualBox()->natNetworkRefInc(aNatNetworkName); 1631 1633 if (natCount == -1) 1632 1634 return E_INVALIDARG; /* not found */ -
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r48955 r48968 3114 3114 3115 3115 rc = nat->Start(Bstr("whatever").raw()); 3116 if (SUCCEEDED(rc)) 3117 LogRel(("Started NAT network '%ls'\n", aNetworkName)); 3118 else 3119 LogRel(("Error %Rhrc starting NAT network '%ls'\n", rc, aNetworkName)); 3116 3120 AssertComRCReturn(rc, -1); 3117 3121 } … … 3140 3144 3141 3145 rc = nat->Stop(); 3146 if (SUCCEEDED(rc)) 3147 LogRel(("Stopped NAT network '%ls'\n", aNetworkName)); 3148 else 3149 LogRel(("Error %Rhrc stopping NAT network '%ls'\n", rc, aNetworkName)); 3142 3150 AssertComRCReturn(rc, -1); 3143 3151 }
Note:
See TracChangeset
for help on using the changeset viewer.