Changeset 40657 in vbox
- Timestamp:
- Mar 27, 2012 8:24:39 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 77089
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestControl/service.cpp
r39441 r40657 692 692 * Get the next unassigned host command in the list. 693 693 */ 694 HostCmd curCmd = mHostCmds.front();694 HostCmd &curCmd = mHostCmds.front(); 695 695 rc = assignHostCmdToGuest(&curCmd, callHandle, cParms, paParms); 696 696 if (RT_SUCCESS(rc)) … … 706 706 mHostCmds.pop_front(); 707 707 } 708 else if (rc == VERR_BUFFER_OVERFLOW)708 else 709 709 { 710 bool fRemoveCmd = false; 711 uint32_t uTries = curCmd.mTries++; 712 710 713 /* If the client understood the message but supplied too little buffer space 711 714 * don't send this message again and drop it after 3 unsuccessful attempts. 712 715 * The host then should take care of next actions (maybe retry it with a smaller buffer). */ 713 if (++curCmd.mTries >= 3) 716 if ( rc == VERR_BUFFER_OVERFLOW 717 && uTries >= 3) 714 718 { 715 paramBufferFree(&curCmd.mParmBuf); 716 mHostCmds.pop_front(); 719 fRemoveCmd = true; 717 720 } 718 }719 else720 {721 721 /* Client did not understand the message or something else weird happened. Try again one 722 722 * more time and drop it if it didn't get handled then. */ 723 if (++curCmd.mTries > 1) 723 else if (uTries > 1) 724 fRemoveCmd = true; 725 726 if (fRemoveCmd) 724 727 { 725 728 paramBufferFree(&curCmd.mParmBuf);
Note:
See TracChangeset
for help on using the changeset viewer.