VirtualBox

Changeset 48968 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Oct 8, 2013 10:45:30 AM (11 years ago)
Author:
vboxsync
Message:

Main/NATNetwork: more logging

Location:
trunk/src/VBox/Main/src-server
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r48879 r48968  
    1283512835        {
    1283612836            Bstr name;
    12837 
    1283812837            hrc = mNetworkAdapters[slot]->COMGETTER(NATNetwork)(name.asOutParam());
    1283912838            if (SUCCEEDED(hrc))
    1284012839            {
     12840                LogRel(("VM '%s' starts using NAT network '%ls'\n",
     12841                        mUserData->s.strName.c_str(), name.raw()));
    1284112842                aMachine->lockHandle()->unlockWrite();
    1284212843                mParent->natNetworkRefInc(name.raw());
     
    1306313064            {
    1306413065                multilock.release();
     13066                LogRel(("VM '%s' stops using NAT network '%ls'\n",
     13067                        mUserData->s.strName.c_str(), name.raw()));
    1306513068                mParent->natNetworkRefDec(name.raw());
    1306613069                multilock.acquire();
  • trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp

    r48955 r48968  
    16041604        && state == MachineState_Running)
    16051605    {
    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());
    16091610        if (natCount == -1)
    16101611            return E_INVALIDARG; /* no such network */
     
    16261627    if (state == MachineState_Running)
    16271628    {
    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);
    16311633        if (natCount == -1)
    16321634            return E_INVALIDARG; /* not found */
  • trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp

    r48955 r48968  
    31143114
    31153115        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));
    31163120        AssertComRCReturn(rc, -1);
    31173121    }
     
    31403144
    31413145        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));
    31423150        AssertComRCReturn(rc, -1);
    31433151    }
Note: See TracChangeset for help on using the changeset viewer.

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