Changeset 36749 in vbox
- Timestamp:
- Apr 20, 2011 11:50:36 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71283
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExecThread.cpp
r36732 r36749 304 304 if (RT_SUCCESS(rc)) 305 305 { 306 uint32_t cbRead ;306 uint32_t cbRead = cbSize; 307 307 rc = VBoxServicePipeBufRead(pPipeBuf, pBuf, cbSize, &cbRead); 308 308 if (RT_SUCCESS(rc)) … … 315 315 else 316 316 rc = VERR_NOT_FOUND; /* PID not found! */ 317 RTCritSectLeave(&g_GuestControlExecThreadsCritSect); 317 318 int rc2 = RTCritSectLeave(&g_GuestControlExecThreadsCritSect); 319 if (RT_SUCCESS(rc)) 320 rc = rc2; 318 321 } 319 322 return rc; … … 374 377 } 375 378 376 rc = RTCritSectLeave(&g_GuestControlExecThreadsCritSect); 377 AssertRC(rc); 379 int rc2 = RTCritSectLeave(&g_GuestControlExecThreadsCritSect); 380 if (RT_SUCCESS(rc)) 381 rc = rc2; 378 382 } 379 383 RTCritSectDelete(&g_GuestControlExecThreadsCritSect); -
trunk/src/VBox/Additions/common/VBoxService/VBoxServicePipeBuf.cpp
r36744 r36749 64 64 { 65 65 RTCritSectDelete(&pBuf->CritSect); 66 RTSemEventDestroy(pBuf->hEventSem); 66 if (pBuf->hEventSem != NIL_RTSEMEVENT) 67 RTSemEventDestroy(pBuf->hEventSem); 67 68 } 68 69 } … … 89 90 AssertReturn(cbBuffer, VERR_INVALID_PARAMETER); 90 91 AssertPtrReturn(pcbToRead, VERR_INVALID_POINTER); 92 AssertReturn(*pcbToRead > 0, VERR_INVALID_PARAMETER); /* Nothing to read makes no sense ... */ 91 93 92 94 int rc = RTCritSectEnter(&pBuf->CritSect); … … 105 107 pBuf->cbOffset += *pcbToRead; 106 108 107 rc = RTSemEventSignal(pBuf->hEventSem); 108 AssertRC(rc); 109 if (pBuf->hEventSem != NIL_RTSEMEVENT) 110 { 111 rc = RTSemEventSignal(pBuf->hEventSem); 112 AssertRC(rc); 113 } 109 114 } 110 115 else … … 113 118 *pcbToRead = 0; 114 119 } 115 rc = RTCritSectLeave(&pBuf->CritSect); 120 121 int rc2 = RTCritSectLeave(&pBuf->CritSect); 122 if (RT_SUCCESS(rc)) 123 rc = rc2; 116 124 } 117 125 return rc; … … 256 264 *pcbWritten = cbData; 257 265 258 RTSemEventSignal(pBuf->hEventSem); 266 if (pBuf->hEventSem != NIL_RTSEMEVENT) 267 { 268 rc = RTSemEventSignal(pBuf->hEventSem); 269 AssertRC(rc); 270 } 259 271 } 260 272 } … … 275 287 AssertPtrReturn(pBuf, VERR_INVALID_POINTER); 276 288 AssertPtrReturn(pcbWritten, VERR_INVALID_POINTER); 289 AssertPtrReturn(pcbLeft, VERR_INVALID_POINTER); 277 290 278 291 int rc = RTCritSectEnter(&pBuf->CritSect);
Note:
See TracChangeset
for help on using the changeset viewer.