- Timestamp:
- Aug 8, 2013 9:10:54 PM (11 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
r47551 r47622 345 345 GUEST_SESSION_NOTIFYTYPE_ERROR, rc /* uint32_t vs. int */); 346 346 if (RT_FAILURE(rc2)) 347 {348 347 VBoxServiceError("Reporting session error status on open failed with rc=%Rrc\n", rc2); 349 rc = rc2;350 }351 348 } 352 349 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlProcess.cpp
r47551 r47622 1437 1437 } 1438 1438 1439 VBoxServiceVerbose(3, "Guest process \"%s\" got client ID=%u, flags=0x%x\n", 1440 pProcess->StartupInfo.szCmd, pProcess->uClientID, pProcess->StartupInfo.uFlags); 1441 1442 /* The process thread is not interested in receiving any commands; 1443 * tell the host service. */ 1444 rc = VbglR3GuestCtrlMsgFilterSet(pProcess->uClientID, 0 /* Skip all */, 0); 1445 if (RT_FAILURE(rc)) 1446 { 1447 VBoxServiceError("Unable to set message filter, rc=%Rrc\n", rc); 1448 /* Non-critical. */ 1449 } 1450 1439 1451 rc = GstCntlSessionProcessAdd(pProcess->pSession, pProcess); 1440 1452 if (RT_FAILURE(rc)) … … 1445 1457 return rc; 1446 1458 } 1447 1448 VBoxServiceVerbose(3, "Guest process \"%s\" got client ID=%u, flags=0x%x\n",1449 pProcess->StartupInfo.szCmd, pProcess->uClientID, pProcess->StartupInfo.uFlags);1450 1459 1451 1460 bool fSignalled = false; /* Indicator whether we signalled the thread user event already. */ … … 1936 1945 ) 1937 1946 { 1938 VBoxServiceVerbose(3, "[PID %RU32]: dump stdout\n",1939 pThis->uPID);1940 1947 char szDumpFile[RTPATH_MAX]; 1941 1948 if (!RTStrPrintf(szDumpFile, sizeof(szDumpFile), "VBoxService_Session%RU32_PID%RU32_StdOut.txt", -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControlSession.cpp
r47620 r47622 63 63 static int gstcntlSessionHandleFileSeek(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 64 64 static int gstcntlSessionHandleFileTell(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 65 extern int gstcntlSessionHandleProcExec(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 66 extern int gstcntlSessionHandleProcInput(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx, void *pvScratchBuf, size_t cbScratchBuf); 67 extern int gstcntlSessionHandleProcOutput(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 68 extern int gstcntlSessionHandleProcTerminate(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 69 extern int gstcntlSessionHandleProcWaitFor(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 70 /* Guest -> Host handlers. */ 65 static int gstcntlSessionHandleProcExec(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 66 static int gstcntlSessionHandleProcInput(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx, void *pvScratchBuf, size_t cbScratchBuf); 67 static int gstcntlSessionHandleProcOutput(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 68 static int gstcntlSessionHandleProcTerminate(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 69 static int gstcntlSessionHandleProcWaitFor(const PVBOXSERVICECTRLSESSION pSession, PVBGLR3GUESTCTRLCMDCTX pHostCtx); 71 70 72 71 … … 513 512 AssertPtrReturn(pHostCtx, VERR_INVALID_POINTER); 514 513 515 int rc ;514 int rc = VINF_SUCCESS; 516 515 bool fStartAllowed = false; /* Flag indicating whether starting a process is allowed or not. */ 517 516 518 if ( (pHostCtx->uProtocol < 2 && pHostCtx->uNumParms == 11) 519 || (pHostCtx->uProtocol >= 2 && pHostCtx->uNumParms == 12) 520 ) 517 switch (pHostCtx->uProtocol) 518 { 519 case 1: /* Guest Additions < 4.3. */ 520 if (pHostCtx->uNumParms != 11) 521 rc = VERR_NOT_SUPPORTED; 522 break; 523 524 case 2: /* Guest Additions >= 4.3. */ 525 if (pHostCtx->uNumParms != 12) 526 rc = VERR_NOT_SUPPORTED; 527 break; 528 529 default: 530 rc = VERR_NOT_SUPPORTED; 531 break; 532 } 533 534 if (RT_SUCCESS(rc)) 521 535 { 522 536 VBOXSERVICECTRLPROCSTARTUPINFO startupInfo; … … 568 582 } 569 583 } 570 else571 rc = VERR_NOT_SUPPORTED; /* Unsupported number of parameters. */572 584 573 585 /* In case of an error we need to notify the host to not wait forever for our response. */ … … 648 660 fPendingClose = true; 649 661 #ifdef DEBUG_andy 650 VBoxServiceVerbose(4, "Got last process input block for PID=%RU32 of size %RU32...\n",662 VBoxServiceVerbose(4, "Got last process input block for PID=%RU32 (%RU32 bytes) ...\n", 651 663 uPID, cbSize); 652 664 #endif … … 795 807 796 808 int rc = VINF_SUCCESS; 797 798 /** @todo Implement asynchronous handling of all commands to speed up overall799 * performance for handling multiple guest processes at once. At the moment800 * only one guest process at a time can and will be served. */801 802 809 /** 803 810 * Only anonymous sessions (that is, sessions which run with local … … 926 933 VBoxServiceVerbose(3, "Session ID=%RU32 thread running, client ID=%RU32\n", 927 934 uSessionID, uClientID); 935 936 /* The session thread is not interested in receiving any commands; 937 * tell the host service. */ 938 rc = VbglR3GuestCtrlMsgFilterSet(uClientID, 0 /* Skip all */, 0); 939 if (RT_FAILURE(rc)) 940 { 941 VBoxServiceError("Unable to set message filter, rc=%Rrc\n", rc); 942 /* Non-critical. */ 943 } 928 944 } 929 945 else … … 1140 1156 if (rc == VERR_TOO_MUCH_DATA) 1141 1157 { 1158 #ifdef DEBUG 1142 1159 VBoxServiceVerbose(4, "Message requires %RU32 parameters, but only 2 supplied -- retrying request (no error!)...\n", cParms); 1160 #endif 1143 1161 rc = VINF_SUCCESS; /* Try to get "real" message in next block below. */ 1144 1162 } … … 1147 1165 if (RT_SUCCESS(rc)) 1148 1166 { 1167 #ifdef DEBUG 1149 1168 VBoxServiceVerbose(3, "Msg=%RU32 (%RU32 parms) retrieved\n", uMsg, cParms); 1150 1169 #endif 1151 1170 /* Set number of parameters for current host context. */ 1152 1171 ctxHost.uNumParms = cParms;
Note:
See TracChangeset
for help on using the changeset viewer.