Changeset 36309 in vbox
- Timestamp:
- Mar 17, 2011 2:43:25 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70617
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r36206 r36309 1243 1243 && !fCompleted) 1244 1244 { 1245 1245 /* If we previously got completed notification, don't trigger again. */ 1246 1246 it->second.pProgress->notifyComplete(S_OK); 1247 1247 } … … 1270 1270 /* Save bytes processed. */ 1271 1271 pCBData->cbProcessed = pData->cbProcessed; 1272 pCBData->u32Status = pData->u32Status; 1273 pCBData->u32Flags = pData->u32Flags; 1274 pCBData->u32PID = pData->u32PID; 1272 1275 1273 1276 /* Only trigger completion once. */ … … 1950 1953 if (FAILED(rc)) throw rc; 1951 1954 1952 /* Was the call completed within time? */ 1953 LONG uResult; 1954 if ( SUCCEEDED(it->second.pProgress->COMGETTER(ResultCode)(&uResult)) 1955 && uResult == S_OK) 1956 { 1957 PCALLBACKDATAEXECINSTATUS pStatusData = (PCALLBACKDATAEXECINSTATUS)it->second.pvData; 1958 AssertPtr(pStatusData); 1959 Assert(it->second.cbData == sizeof(CALLBACKDATAEXECINSTATUS)); 1960 1961 *aBytesWritten = pStatusData->cbProcessed; 1962 } 1963 else if ( SUCCEEDED(it->second.pProgress->COMGETTER(Canceled)(&fCanceled)) 1964 && fCanceled) 1965 { 1966 rc = setError(VBOX_E_IPRT_ERROR, 1967 tr("The input operation was canceled by the guest")); 1955 /* Was the operation canceled by one of the parties? */ 1956 rc = it->second.pProgress->COMGETTER(Canceled)(&fCanceled); 1957 if (FAILED(rc)) throw rc; 1958 1959 if (!fCanceled) 1960 { 1961 BOOL fCompleted; 1962 if ( SUCCEEDED(it->second.pProgress->COMGETTER(Completed)(&fCompleted)) 1963 && fCompleted) 1964 { 1965 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1966 1967 PCALLBACKDATAEXECINSTATUS pStatusData = (PCALLBACKDATAEXECINSTATUS)it->second.pvData; 1968 AssertPtr(pStatusData); 1969 Assert(it->second.cbData == sizeof(CALLBACKDATAEXECINSTATUS)); 1970 1971 switch (pStatusData->u32Status) 1972 { 1973 case INPUT_STS_WRITTEN: 1974 *aBytesWritten = pStatusData->cbProcessed; 1975 break; 1976 1977 default: 1978 rc = setError(VBOX_E_IPRT_ERROR, 1979 tr("Client error %u while processing input data"), pStatusData->u32Status); 1980 break; 1981 } 1982 } 1983 else 1984 rc = setError(VBOX_E_IPRT_ERROR, 1985 tr("The input operation was not acknowledged from guest within time (%ums)"), aTimeoutMS); 1968 1986 } 1969 1987 else 1970 1988 rc = setError(VBOX_E_IPRT_ERROR, 1971 tr("The input operation was not acknowledged from guest within time (%ums)"), aTimeoutMS); 1972 1989 tr("The input operation was canceled by the guest")); 1973 1990 { 1974 1991 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
Note:
See TracChangeset
for help on using the changeset viewer.