Changeset 75747 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Nov 26, 2018 6:54:55 PM (6 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/HGCM.cpp
r75740 r75747 139 139 ~HGCMService() {}; 140 140 141 static DECLCALLBACK( void)svcHlpCallComplete(VBOXHGCMCALLHANDLE callHandle, int32_t rc);141 static DECLCALLBACK(int) svcHlpCallComplete(VBOXHGCMCALLHANDLE callHandle, int32_t rc); 142 142 static DECLCALLBACK(void) svcHlpDisconnectClient(void *pvInstance, uint32_t u32ClientId); 143 143 static DECLCALLBACK(bool) svcHlpIsCallRestored(VBOXHGCMCALLHANDLE callHandle); … … 796 796 * @interface_method_impl{VBOXHGCMSVCHELPERS,pfnCallComplete} 797 797 */ 798 /* static */ DECLCALLBACK( void) HGCMService::svcHlpCallComplete(VBOXHGCMCALLHANDLE callHandle, int32_t rc)798 /* static */ DECLCALLBACK(int) HGCMService::svcHlpCallComplete(VBOXHGCMCALLHANDLE callHandle, int32_t rc) 799 799 { 800 800 HGCMMsgCore *pMsgCore = (HGCMMsgCore *)callHandle; 801 801 802 if (pMsgCore->MsgId () == SVC_MSG_GUESTCALL) 803 { 804 /* Only call the completion for these messages. The helper 805 * is called by the service, and the service does not get 806 * any other messages. 807 */ 808 hgcmMsgComplete(pMsgCore, rc); 809 } 810 else 811 { 812 AssertFailed(); 813 } 802 /* Only call the completion for these messages. The helper 803 * is called by the service, and the service does not get 804 * any other messages. 805 */ 806 AssertMsgReturn(pMsgCore->MsgId() == SVC_MSG_GUESTCALL, ("%d\n", pMsgCore->MsgId()), VERR_WRONG_TYPE); 807 return hgcmMsgComplete(pMsgCore, rc); 814 808 } 815 809 -
trunk/src/VBox/Main/src-client/HGCMThread.cpp
r75601 r75747 147 147 int MsgGet(HGCMMsgCore **ppMsg); 148 148 int MsgPost(HGCMMsgCore *pMsg, PHGCMMSGCALLBACK pfnCallback, bool bWait); 149 voidMsgComplete(HGCMMsgCore *pMsg, int32_t result);149 int MsgComplete(HGCMMsgCore *pMsg, int32_t result); 150 150 }; 151 151 … … 554 554 } 555 555 556 voidHGCMThread::MsgComplete(HGCMMsgCore *pMsg, int32_t result)556 int HGCMThread::MsgComplete(HGCMMsgCore *pMsg, int32_t result) 557 557 { 558 558 LogFlow(("HGCMThread::MsgComplete: thread = %p, pMsg = %p\n", this, pMsg)); … … 561 561 AssertReleaseMsg((pMsg->m_fu32Flags & HGCM_MSG_F_IN_PROCESS) != 0, ("%p %x\n", pMsg, pMsg->m_fu32Flags)); 562 562 563 int rcRet = VINF_SUCCESS; 563 564 if (pMsg->m_pfnCallback) 564 565 { 565 566 /** @todo call callback with error code in MsgPost in case of errors */ 566 567 567 pMsg->m_pfnCallback(result, pMsg);568 569 LogFlow(("HGCMThread::MsgComplete: callback executed. pMsg = %p, thread = %p \n", pMsg, this));568 rcRet = pMsg->m_pfnCallback(result, pMsg); 569 570 LogFlow(("HGCMThread::MsgComplete: callback executed. pMsg = %p, thread = %p, rcRet = %Rrc\n", pMsg, this, rcRet)); 570 571 } 571 572 … … 616 617 } 617 618 } 619 620 return rcRet; 618 621 } 619 622 … … 737 740 } 738 741 739 voidhgcmMsgComplete(HGCMMsgCore *pMsg, int32_t u32Result)742 int hgcmMsgComplete(HGCMMsgCore *pMsg, int32_t u32Result) 740 743 { 741 744 LogFlow(("MAIN::hgcmMsgComplete: pMsg = %p\n", pMsg)); 742 745 746 int rc; 743 747 if (pMsg) 744 pMsg->Thread()->MsgComplete(pMsg, u32Result); 745 746 747 LogFlow(("MAIN::hgcmMsgComplete: pMsg = %p, rc = void\n", pMsg)); 748 rc = pMsg->Thread()->MsgComplete(pMsg, u32Result); 749 else 750 rc = VINF_SUCCESS; 751 752 LogFlow(("MAIN::hgcmMsgComplete: pMsg = %p, rc = %Rrc\n", pMsg, rc)); 753 return rc; 748 754 } 749 755
Note:
See TracChangeset
for help on using the changeset viewer.