Changeset 45697 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Apr 24, 2013 1:30:50 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85242
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestControl/service.cpp
r45482 r45697 332 332 rc = VERR_INVALID_PARAMETER; 333 333 334 if (paDstParms[i].u.pointer.size < mpParms[i].u.pointer.size) 334 if ( RT_SUCCESS(rc) 335 && paDstParms[i].u.pointer.size < mpParms[i].u.pointer.size) 335 336 rc = VERR_BUFFER_OVERFLOW; 336 337 … … 525 526 mHostCmdRc = VINF_SUCCESS; 526 527 mHostCmdTries = 0; 528 mPeekCount = 0; 527 529 528 530 return nextItem; … … 630 632 int rc = VINF_SUCCESS; 631 633 632 LogFlowFunc(("[Client %RU32] pConnection=%p, mHostCmdRc=%Rrc, mHostCmdTries=%RU32 \n",633 mID, pConnection, mHostCmdRc, mHostCmdTries ));634 LogFlowFunc(("[Client %RU32] pConnection=%p, mHostCmdRc=%Rrc, mHostCmdTries=%RU32, mPeekCount=%RU32\n", 635 mID, pConnection, mHostCmdRc, mHostCmdTries, mPeekCount)); 634 636 635 637 mHostCmdRc = SendReply(pConnection, pHostCmd); … … 644 646 /* 645 647 * If the client understood the message but supplied too little buffer space 646 * don't send this message again and drop it after 3 unsuccessful attempts. 647 * The host then should take care of next actions (maybe retry it with a smaller buffer). 648 * don't send this message again and drop it after 6 unsuccessful attempts. 649 * 650 * Note: Due to legacy reasons this the retry counter has to be even because on 651 * every peek there will be the actual command retrieval from the client side. 652 * To not get the actual command if the client actually only wants to peek for 653 * the next command, there needs to be two rounds per try, e.g. 3 rounds = 6 tries. 654 * 655 ** @todo Fix the mess stated above. GUEST_MSG_WAIT should be become GUEST_MSG_PEEK, *only* 656 * (and every time) returning the next upcoming host command (if any, blocking). Then 657 * it's up to the client what to do next, either peeking again or getting the actual 658 * host command via an own GUEST_ type message. 648 659 */ 649 660 if (mHostCmdRc == VERR_TOO_MUCH_DATA) 650 661 { 651 if (mHostCmdTries >= 3)662 if (mHostCmdTries == 6) 652 663 fRemove = true; 653 664 } … … 777 788 else 778 789 { 790 /* If this is the very first peek, make sure to *always* give back the peeking answer 791 * instead of the actual command, even if this command would fit into the current 792 * connection buffer. */ 779 793 if (!mPeekCount) 780 794 {
Note:
See TracChangeset
for help on using the changeset viewer.