Changeset 40061 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Feb 10, 2012 2:02:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/GuestCtrlImpl.cpp
r40020 r40061 2114 2114 uHandleID = OUTPUT_HANDLE_ID_STDERR; 2115 2115 2116 /** @todo Use a buffer for next iteration if returned data is too big 2117 * for current read. 2118 * aSize is bogus -- will be ignored atm! */ 2116 2119 VBOXGUESTCTRL_CALLBACK callback; 2117 2120 vrc = callbackInit(&callback, VBOXGUESTCTRLCALLBACKTYPE_EXEC_OUTPUT, pProgress); … … 2182 2185 if (pExecOut->cbData) 2183 2186 { 2187 bool fResize; 2188 2184 2189 /* Do we need to resize the array? */ 2185 2190 if (pExecOut->cbData > aSize) 2186 outputData.resize(pExecOut->cbData); 2191 { 2192 fResize = outputData.resize(pExecOut->cbData); 2193 Assert(fResize); 2194 } 2187 2195 2188 2196 /* Fill output in supplied out buffer. */ 2197 Assert(outputData.size() >= pExecOut->cbData); 2189 2198 memcpy(outputData.raw(), pExecOut->pvData, pExecOut->cbData); 2190 outputData.resize(pExecOut->cbData); /* Shrink to fit actual buffer size. */ 2199 fResize = outputData.resize(pExecOut->cbData); /* Shrink to fit actual buffer size. */ 2200 Assert(fResize); 2191 2201 } 2192 2202 else 2193 2203 { 2194 2204 /* No data within specified timeout available. */ 2195 outputData.resize(0); 2205 bool fResize = outputData.resize(0); 2206 Assert(fResize); 2196 2207 } 2197 2208
Note:
See TracChangeset
for help on using the changeset viewer.