Changeset 29438 in vbox for trunk/src/VBox/HostServices/GuestControl
- Timestamp:
- May 12, 2010 9:50:16 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 61556
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestControl/service.cpp
r29220 r29438 220 220 int sendHostCmdToGuest(HostCmd *pCmd, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 221 221 int retrieveNextHostCmd(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 222 int cancelPendingWaits(uint32_t u32ClientID); 222 223 int notifyHost(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 223 224 int processHostCmd(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); … … 443 444 } 444 445 446 int Service::cancelPendingWaits(uint32_t u32ClientID) 447 { 448 int rc = VINF_SUCCESS; 449 CallListIter it = mClientList.begin(); 450 while (it != mClientList.end()) 451 { 452 if (it->mClientID == u32ClientID) 453 { 454 if (it->mNumParms >= 2) 455 { 456 it->mParms[0].setUInt32(GETHOSTMSG_EXEC_HOST_CANCEL_WAIT); /* Message ID */ 457 it->mParms[1].setUInt32(0); /* Required parameters for message */ 458 } 459 if (mpHelpers) 460 mpHelpers->pfnCallComplete(it->mHandle, rc); 461 it = mClientList.erase(it); 462 } 463 else 464 it++; 465 } 466 return rc; 467 } 468 445 469 int Service::notifyHost(uint32_t eFunction, uint32_t cParms, VBOXHGCMSVCPARM paParms[]) 446 470 { … … 503 527 504 528 /* In any case the client did something, so wake up and remove from list. */ 529 AssertPtr(mpHelpers); 505 530 mpHelpers->pfnCallComplete(guest.mHandle, rc); 506 531 mClientList.pop_front(); … … 559 584 break; 560 585 586 case GUEST_CANCEL_PENDING_WAITS: 587 LogFlowFunc(("GUEST_CANCEL_PENDING_WAITS\n")); 588 rc = cancelPendingWaits(u32ClientID); 589 break; 590 561 591 /* The guest notifies the host that some output at stdout/stderr is available. */ 562 592 case GUEST_EXEC_SEND_OUTPUT: … … 578 608 { 579 609 /* Tell the client that the call is complete (unblocks waiting). */ 610 AssertPtr(mpHelpers); 580 611 mpHelpers->pfnCallComplete(callHandle, rc); 581 612 }
Note:
See TracChangeset
for help on using the changeset viewer.