Changeset 75824 in vbox for trunk/src/VBox/Additions/common/VBoxGuest/lib
- Timestamp:
- Nov 29, 2018 10:12:53 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp
r75807 r75824 427 427 * @return IPRT status code. 428 428 * @param idClient The client ID returned by VbglR3GuestCtrlConnect(). 429 */ 430 VBGLR3DECL(int) VbglR3GuestCtrlMsgSkip(uint32_t idClient) 429 * @param rcSkip The status code to pass back to Main when skipping. 430 * @param idMsg The message ID to skip, pass UINT32_MAX to pass any. 431 */ 432 VBGLR3DECL(int) VbglR3GuestCtrlMsgSkip(uint32_t idClient, int rcSkip, uint32_t idMsg) 431 433 { 432 434 if (vbglR3GuestCtrlSupportsPeekGetCancel(idClient)) 433 435 { 434 VBGLIOCHGCMCALL Hdr; 435 VBGL_HGCM_HDR_INIT(&Hdr, idClient, GUEST_MSG_SKIP, 0); 436 return VbglR3HGCMCall(&Hdr, sizeof(Hdr)); 436 struct 437 { 438 VBGLIOCHGCMCALL Hdr; 439 HGCMFunctionParameter rcSkip; 440 HGCMFunctionParameter idMsg; 441 } Msg; 442 VBGL_HGCM_HDR_INIT(&Msg.Hdr, idClient, GUEST_MSG_SKIP, 2); 443 VbglHGCMParmUInt32Set(&Msg.rcSkip, (uint32_t)rcSkip); 444 VbglHGCMParmUInt32Set(&Msg.idMsg, idMsg); 445 return VbglR3HGCMCall(&Msg.Hdr, sizeof(Msg)); 437 446 } 438 447 … … 624 633 *pidSession = VBOX_GUESTCTRL_CONTEXTID_GET_SESSION(pCtx->uContextID); 625 634 } 626 /* Try get the context ID so we can inform the host about this message retrival failure. */627 else if (Msg.context.u.value32 != HOST_SESSION_CREATE)628 Msg.context.GetUInt32(&pCtx->uContextID);629 635 630 636 } while (rc == VERR_INTERRUPTED && g_fVbglR3GuestCtrlHavePeekGetCancel); … … 666 672 667 673 /** 668 * Retrieves a HOST_ SESSION_CLOSE message.674 * Retrieves a HOST_PATH_RENAME message. 669 675 */ 670 676 VBGLR3DECL(int) VbglR3GuestCtrlPathGetRename(PVBGLR3GUESTCTRLCMDCTX pCtx, … … 698 704 Msg.flags.GetUInt32(pfFlags); 699 705 } 706 700 707 } while (rc == VERR_INTERRUPTED && g_fVbglR3GuestCtrlHavePeekGetCancel); 701 708 return rc; … … 913 920 } 914 921 } while (rc == VERR_INTERRUPTED && g_fVbglR3GuestCtrlHavePeekGetCancel); 915 return rc; 922 923 if ( rc != VERR_TOO_MUCH_DATA 924 || g_fVbglR3GuestCtrlHavePeekGetCancel) 925 return rc; 926 return VERR_BUFFER_OVERFLOW; 916 927 } 917 928 … … 1129 1140 } 1130 1141 } while (rc == VERR_INTERRUPTED && g_fVbglR3GuestCtrlHavePeekGetCancel); 1131 return rc; 1142 1143 if ( rc != VERR_TOO_MUCH_DATA 1144 || g_fVbglR3GuestCtrlHavePeekGetCancel) 1145 return rc; 1146 return VERR_BUFFER_OVERFLOW; 1132 1147 } 1133 1148 … … 1167 1182 } 1168 1183 } while (rc == VERR_INTERRUPTED && g_fVbglR3GuestCtrlHavePeekGetCancel); 1169 return rc; 1184 1185 if ( rc != VERR_TOO_MUCH_DATA 1186 || g_fVbglR3GuestCtrlHavePeekGetCancel) 1187 return rc; 1188 return VERR_BUFFER_OVERFLOW; 1170 1189 } 1171 1190
Note:
See TracChangeset
for help on using the changeset viewer.