Changeset 79253 in vbox for trunk/src/VBox
- Timestamp:
- Jun 20, 2019 2:21:53 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestFileImpl.cpp
r79189 r79253 1036 1036 if (evtType == VBoxEventType_OnGuestFileRead) 1037 1037 { 1038 vrc = VINF_SUCCESS; 1039 1038 1040 ComPtr<IGuestFileReadEvent> pFileEvent = pIEvent; 1039 1041 Assert(!pFileEvent.isNull()); 1040 1042 1041 HRESULT hr;1042 1043 if (pvData) 1043 1044 { 1044 1045 com::SafeArray <BYTE> data; 1045 hr= pFileEvent->COMGETTER(Data)(ComSafeArrayAsOutParam(data));1046 ComAssertComRC(hr );1046 HRESULT hrc1 = pFileEvent->COMGETTER(Data)(ComSafeArrayAsOutParam(data)); 1047 ComAssertComRC(hrc1); 1047 1048 const size_t cbRead = data.size(); 1048 1049 if (cbRead) … … 1053 1054 vrc = VERR_BUFFER_OVERFLOW; 1054 1055 } 1055 else 1056 vrc = VERR_NO_DATA; 1056 /* else: used to be VERR_NO_DATA, but that messes stuff up. */ 1057 1058 if (pcbRead) 1059 { 1060 *pcbRead = (uint32_t)cbRead; 1061 Assert(*pcbRead == cbRead); 1062 } 1057 1063 } 1058 if (pcbRead)1064 else if (pcbRead) 1059 1065 { 1060 hr = pFileEvent->COMGETTER(Processed)((ULONG*)pcbRead); 1061 ComAssertComRC(hr); 1066 *pcbRead = 0; 1067 HRESULT hrc2 = pFileEvent->COMGETTER(Processed)((ULONG *)pcbRead); 1068 ComAssertComRC(hrc2); NOREF(hrc2); 1062 1069 } 1063 1070 }
Note:
See TracChangeset
for help on using the changeset viewer.