Changeset 36887 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Apr 29, 2011 10:04:52 AM (14 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
r36756 r36887 191 191 192 192 /** 193 * Handle pending output data or error on standard out, standard error or the 194 * test pipe. 195 * 196 * @returns IPRT status code from client send. 197 * @param pThread The thread specific data. 193 * Handle pending output data/error on standard out or standard error. 194 * 195 * @return IPRT status code. 198 196 * @param hPollSet The polling set. 199 197 * @param fPollEvt The event mask returned by RTPollNoResume. 200 * @param phPipeR The pipe handle. 201 * @param pu32Crc The current CRC-32 of the stream. (In/Out) 202 * @param uHandleId The handle ID. 203 * 204 * @todo Put the last 4 parameters into a struct! 198 * @param phPipeR The pipe to be read from. 199 * @param uHandleId Handle ID of the pipe to be read from. 200 * @param pBuf Pointer to pipe buffer to store the read data into. 205 201 */ 206 202 static int VBoxServiceControlExecProcHandleOutputEvent(RTPOLLSET hPollSet, uint32_t fPollEvt, PRTPIPE phPipeR, 207 uint32_t uHandleId, PVBOXSERVICECTRLEXECPIPEBUF pStdOutBuf) 208 { 203 uint32_t uHandleId, PVBOXSERVICECTRLEXECPIPEBUF pBuf) 204 { 205 AssertPtrReturn(phPipeR, VERR_INVALID_POINTER); 206 AssertPtrReturn(pBuf, VERR_INVALID_POINTER); 207 209 208 #ifdef DEBUG 210 VBoxServiceVerbose(4, "ControlExec: HandleOutputEvent: fPollEvt=%#x\n", fPollEvt); 209 VBoxServiceVerbose(4, "ControlExec: HandleOutputEvent: fPollEvt=%#x, uHandle=%u\n", 210 fPollEvt, uHandleId); 211 211 #endif 212 212 … … 222 222 { 223 223 uint32_t cbWritten; 224 rc = VBoxServicePipeBufWriteToBuf(p StdOutBuf, abBuf,224 rc = VBoxServicePipeBufWriteToBuf(pBuf, abBuf, 225 225 cbRead, false /* Pending close */, &cbWritten); 226 226 if (RT_SUCCESS(rc)) … … 376 376 case VBOXSERVICECTRLPIPEID_STDERR: 377 377 rc = VBoxServiceControlExecProcHandleOutputEvent(hPollSet, fPollEvt, phStdErrR, 378 VBOXSERVICECTRLPIPEID_STDERR, &pData->std Out);378 VBOXSERVICECTRLPIPEID_STDERR, &pData->stdErr); 379 379 break; 380 380 … … 1348 1348 * on the host never will get completed! */ 1349 1349 /* cbRead now contains actual size. */ 1350 rc = VbglR3GuestCtrlExecSendOut(u32ClientId, uContextID, uPID, uHandleID, 0 /* Flags */,1350 rc = VbglR3GuestCtrlExecSendOut(u32ClientId, uContextID, uPID, uHandleID, uFlags, 1351 1351 pBuf, cbRead); 1352 1352 } -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExecThread.cpp
r36749 r36887 27 27 #include <iprt/semaphore.h> 28 28 #include <iprt/string.h> 29 30 #include <VBox/HostServices/GuestControlSvc.h> 29 31 30 32 #include "VBoxServicePipeBuf.h" … … 285 287 switch (uHandleId) 286 288 { 287 case 2: /* StdErr */289 case OUTPUT_HANDLE_ID_STDERR: /* StdErr */ 288 290 pPipeBuf = &pData->stdErr; 289 291 break; 290 292 291 case 0: /* StdOut */293 case OUTPUT_HANDLE_ID_STDOUT: /* StdOut */ 292 294 default: 293 295 pPipeBuf = &pData->stdOut;
Note:
See TracChangeset
for help on using the changeset viewer.