- Timestamp:
- Aug 15, 2013 1:04:51 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 88020
- Location:
- trunk/src/VBox
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp
r47698 r47762 1060 1060 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1061 1061 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 1062 1070 int rc = VERR_MAX_PROCS_REACHED; 1063 1071 if (mData.mNumObjects >= VBOX_GUESTCTRL_MAX_OBJECTS) … … 1107 1115 if (RT_SUCCESS(rc)) 1108 1116 { 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; 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 } 1125 1139 1126 1140 LogFlowFuncLeaveRC(rc); … … 1629 1643 1630 1644 /* Add the created process to our map. */ 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)); 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 } 1640 1661 1641 1662 return rc; … … 1820 1841 uint32_t uVBoxMinor = VBOX_FULL_VERSION_GET_MINOR(uVerAdditions); 1821 1842 1822 #if 01843 #if 1 1823 1844 /* Hardcode the to-used protocol version; nice for testing side effects. */ 1824 1845 mData.mProtocolVersion = 2; … … 2754 2775 switch (vrc) 2755 2776 { 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 2756 2782 case VERR_GSTCTL_GUEST_ERROR: 2757 2783 hr = GuestFile::setErrorExternal(this, guestRc); -
trunk/src/VBox/Runtime/Makefile.kmk
r47535 r47762 330 330 common/misc/RTAssertMsg2Weak.cpp \ 331 331 common/misc/RTAssertMsg2WeakV.cpp \ 332 common/misc/RTFileModeToFlags.cpp \ 332 333 common/misc/RTFileOpenF.cpp \ 333 334 common/misc/RTFileOpenV.cpp \ -
trunk/src/VBox/Runtime/testcase/Makefile.kmk
r47085 r47762 65 65 tstRTFileGetSize-1 \ 66 66 tstFileLock \ 67 tstFileModeStringToFlags \ 67 68 tstFork \ 68 69 tstRTHttp \ … … 272 273 tstFileLock_SOURCES = tstFileLock.cpp 273 274 275 tstFileModeStringToFlags_TEMPLATE = VBOXR3TSTEXE 276 tstFileModeStringToFlags_SOURCES = tstFileModeStringToFlags.cpp 277 274 278 tstFork_TEMPLATE = VBOXR3TSTEXE 275 279 tstFork_SOURCES = tstFork.cpp
Note:
See TracChangeset
for help on using the changeset viewer.