VirtualBox

Changeset 47764 in vbox


Ignore:
Timestamp:
Aug 15, 2013 1:19:36 PM (11 years ago)
Author:
vboxsync
Message:

Committed too much.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r47762 r47764  
    10601060    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    10611061
    1062     /* Guest Additions < 4.3 don't support handling
    1063        guest files, skip. */
    1064     if (mData.mProtocolVersion < 2)
    1065     {
    1066         LogFlowThisFunc(("Installed Guest Additions don't support handling guest files, skipping\n"));
    1067         return VERR_NOT_SUPPORTED;
    1068     }
    1069 
    10701062    int rc = VERR_MAX_PROCS_REACHED;
    10711063    if (mData.mNumObjects >= VBOX_GUESTCTRL_MAX_OBJECTS)
     
    11151107    if (RT_SUCCESS(rc))
    11161108    {
    1117         try
    1118         {
    1119             /* Add the created file to our vector. */
    1120             mData.mFiles[uNewFileID] = pFile;
    1121             mData.mNumObjects++;
    1122             Assert(mData.mNumObjects <= VBOX_GUESTCTRL_MAX_OBJECTS);
    1123 
    1124             LogFlowFunc(("Added new guest file \"%s\" (Session: %RU32) (now total %ld files, %ld objects)\n",
    1125                          openInfo.mFileName.c_str(), mData.mSession.mID, mData.mFiles.size(), mData.mNumObjects));
    1126 
    1127             alock.release(); /* Release lock before firing off event. */
    1128 
    1129             fireGuestFileRegisteredEvent(mEventSource, this, pFile,
    1130                                          true /* Registered */);
    1131             if (pGuestRc)
    1132                 *pGuestRc = guestRc;
    1133         }
    1134         catch (std::bad_alloc &)
    1135         {
    1136             rc = VERR_NO_MEMORY;
    1137         }
    1138     }
     1109        /* Add the created file to our vector. */
     1110        mData.mFiles[uNewFileID] = pFile;
     1111        mData.mNumObjects++;
     1112        Assert(mData.mNumObjects <= VBOX_GUESTCTRL_MAX_OBJECTS);
     1113
     1114        LogFlowFunc(("Added new guest file \"%s\" (Session: %RU32) (now total %ld files, %ld objects)\n",
     1115                     openInfo.mFileName.c_str(), mData.mSession.mID, mData.mFiles.size(), mData.mNumObjects));
     1116
     1117        alock.release(); /* Release lock before firing off event. */
     1118
     1119        fireGuestFileRegisteredEvent(mEventSource, this, pFile,
     1120                                     true /* Registered */);
     1121    }
     1122
     1123    if (pGuestRc)
     1124        *pGuestRc = guestRc;
    11391125
    11401126    LogFlowFuncLeaveRC(rc);
     
    16431629
    16441630    /* Add the created process to our map. */
    1645     try
    1646     {
    1647         mData.mProcesses[uNewProcessID] = pProcess;
    1648         mData.mNumObjects++;
    1649         Assert(mData.mNumObjects <= VBOX_GUESTCTRL_MAX_OBJECTS);
    1650 
    1651         LogFlowFunc(("Added new process (Session: %RU32) with process ID=%RU32 (now total %ld processes, %ld objects)\n",
    1652                      mData.mSession.mID, uNewProcessID, mData.mProcesses.size(), mData.mNumObjects));
    1653 
    1654         fireGuestProcessRegisteredEvent(mEventSource, this /* Session */, pProcess,
    1655                                         0 /* PID */, true /* Process registered */);
    1656     }
    1657     catch (std::bad_alloc &)
    1658     {
    1659         rc = VERR_NO_MEMORY;
    1660     }
     1631    mData.mProcesses[uNewProcessID] = pProcess;
     1632    mData.mNumObjects++;
     1633    Assert(mData.mNumObjects <= VBOX_GUESTCTRL_MAX_OBJECTS);
     1634
     1635    fireGuestProcessRegisteredEvent(mEventSource, this /* Session */, pProcess,
     1636                                    0 /* PID */, true /* Process registered */);
     1637
     1638    LogFlowFunc(("Added new process (Session: %RU32) with process ID=%RU32 (now total %ld processes, %ld objects)\n",
     1639                 mData.mSession.mID, uNewProcessID, mData.mProcesses.size(), mData.mNumObjects));
    16611640
    16621641    return rc;
     
    18411820    uint32_t uVBoxMinor    = VBOX_FULL_VERSION_GET_MINOR(uVerAdditions);
    18421821
    1843 #if 1
     1822#if 0
    18441823    /* Hardcode the to-used protocol version; nice for testing side effects. */
    18451824    mData.mProtocolVersion = 2;
     
    27752754        switch (vrc)
    27762755        {
    2777             case VERR_NOT_SUPPORTED:
    2778                 hr = setError(VBOX_E_IPRT_ERROR,
    2779                               tr("Handling guest files not supported by installed Guest Additions"));
    2780                 break;
    2781 
    27822756            case VERR_GSTCTL_GUEST_ERROR:
    27832757                hr = GuestFile::setErrorExternal(this, guestRc);
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