Changeset 47764 in vbox
- Timestamp:
- Aug 15, 2013 1:19:36 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r47762 r47764 1060 1060 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1061 1061 1062 /* Guest Additions < 4.3 don't support handling1063 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 1070 1062 int rc = VERR_MAX_PROCS_REACHED; 1071 1063 if (mData.mNumObjects >= VBOX_GUESTCTRL_MAX_OBJECTS) … … 1115 1107 if (RT_SUCCESS(rc)) 1116 1108 { 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; 1139 1125 1140 1126 LogFlowFuncLeaveRC(rc); … … 1643 1629 1644 1630 /* 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)); 1661 1640 1662 1641 return rc; … … 1841 1820 uint32_t uVBoxMinor = VBOX_FULL_VERSION_GET_MINOR(uVerAdditions); 1842 1821 1843 #if 11822 #if 0 1844 1823 /* Hardcode the to-used protocol version; nice for testing side effects. */ 1845 1824 mData.mProtocolVersion = 2; … … 2775 2754 switch (vrc) 2776 2755 { 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 2782 2756 case VERR_GSTCTL_GUEST_ERROR: 2783 2757 hr = GuestFile::setErrorExternal(this, guestRc);
Note:
See TracChangeset
for help on using the changeset viewer.