- Timestamp:
- May 17, 2010 11:17:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlExec.cpp
r29516 r29529 579 579 int rc = RTCritSectEnter(&pBuf->CritSect); 580 580 if (RT_SUCCESS(rc)) 581 { 581 { 582 582 Assert(pBuf->cbOffset >= pBuf->cbRead); 583 583 if (*pcbToRead > pBuf->cbOffset - pBuf->cbRead) 584 584 *pcbToRead = pBuf->cbOffset - pBuf->cbRead; 585 585 586 586 if (*pcbToRead > cbBuffer) 587 587 *pcbToRead = cbBuffer; 588 588 589 589 if (*pcbToRead > 0) 590 590 { … … 609 609 int rc = RTCritSectEnter(&pBuf->CritSect); 610 610 if (RT_SUCCESS(rc)) 611 { 611 { 612 612 /** @todo Use RTMemCache or RTMemObj here? */ 613 613 uint8_t *pNewBuf; … … 620 620 pBuf->pbData = pNewBuf; 621 621 } 622 622 623 623 rc = VINF_SUCCESS; 624 624 if (pBuf->pbData) … … 647 647 AssertPtr(pThread); 648 648 649 /* General stuff. */ 649 /* General stuff. */ 650 650 pThread->Node.pPrev = NULL; 651 651 pThread->Node.pNext = NULL; … … 730 730 { 731 731 if (pData) 732 { 732 { 733 733 RTStrFree(pData->pszCmd); 734 734 if (pData->uNumEnvVars) … … 741 741 RTStrFree(pData->pszUser); 742 742 RTStrFree(pData->pszPassword); 743 743 744 744 VBoxServiceControlExecDestroyPipeBuffer(&pData->stdOut); 745 745 VBoxServiceControlExecDestroyPipeBuffer(&pData->stdErr); … … 826 826 rc = RTProcCreateEx(pData->pszCmd, pData->papszArgs, hEnv, RTPROC_FLAGS_SERVICE, 827 827 phStdIn, phStdOut, phStdErr, 828 #ifdef RT_OS_WINDOWS 828 829 strlen(pData->pszUser) ? pData->pszUser : NULL, 829 830 strlen(pData->pszUser) && strlen(pData->pszPassword) ? pData->pszPassword : NULL, 831 #else 832 /* 833 * Never specify a user name and password until RTProcCreateEx supports 834 * that for non-Windows (POSIX) platforms. 835 */ 836 NULL, NULL, 837 #endif 830 838 &hProcess); 831 839 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.