Changeset 43697 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Oct 22, 2012 3:03:03 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestProperties/service.cpp
r40767 r43697 134 134 struct GuestCall 135 135 { 136 uint32_t u32ClientId; 136 137 /** The call handle */ 137 138 VBOXHGCMCALLHANDLE mHandle; … … 144 145 145 146 /** The standard constructor */ 146 GuestCall() : mFunction(0) {}147 GuestCall() : u32ClientId(0), mFunction(0) {} 147 148 /** The normal constructor */ 148 GuestCall( VBOXHGCMCALLHANDLE aHandle, uint32_t aFunction,149 GuestCall(uint32_t aClientId, VBOXHGCMCALLHANDLE aHandle, uint32_t aFunction, 149 150 VBOXHGCMSVCPARM aParms[], int aRc) 150 : mHandle(aHandle), mFunction(aFunction), mParms(aParms),151 : u32ClientId(aClientId), mHandle(aHandle), mFunction(aFunction), mParms(aParms), 151 152 mRc(aRc) {} 152 153 }; … … 371 372 int delProperty(uint32_t cParms, VBOXHGCMSVCPARM paParms[], bool isGuest); 372 373 int enumProps(uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 373 int getNotification( VBOXHGCMCALLHANDLE callHandle, uint32_t cParms,374 int getNotification(uint32_t u32ClientId, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, 374 375 VBOXHGCMSVCPARM paParms[]); 375 376 int getOldNotificationInternal(const char *pszPattern, … … 1014 1015 * @throws can throw std::bad_alloc 1015 1016 */ 1016 int Service::getNotification( VBOXHGCMCALLHANDLE callHandle, uint32_t cParms,1017 int Service::getNotification(uint32_t u32ClientId, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, 1017 1018 VBOXHGCMSVCPARM paParms[]) 1018 1019 { … … 1047 1048 if (RT_SUCCESS(rc) && prop.isNull()) 1048 1049 { 1049 mGuestWaiters.push_back(GuestCall(callHandle, GET_NOTIFICATION, 1050 /* 1051 * Check if the client already had the same request. 1052 * Complete the old request with an error in this case. 1053 * Protection against clients, which cancel and resubmits requests. 1054 */ 1055 CallList::iterator it = mGuestWaiters.begin(); 1056 while (it != mGuestWaiters.end()) 1057 { 1058 const char *pszPatternsExisting; 1059 uint32_t cchPatternsExisting; 1060 int rc3 = it->mParms[0].getString(&pszPatternsExisting, &cchPatternsExisting); 1061 1062 if ( RT_SUCCESS(rc3) 1063 && u32ClientId == it->u32ClientId 1064 && RTStrCmp(pszPatterns, pszPatternsExisting) == 0) 1065 { 1066 /* Complete the old request. */ 1067 mpHelpers->pfnCallComplete(it->mHandle, VERR_INTERRUPTED); 1068 it = mGuestWaiters.erase(it); 1069 } 1070 else 1071 ++it; 1072 } 1073 1074 mGuestWaiters.push_back(GuestCall(u32ClientId, callHandle, GET_NOTIFICATION, 1050 1075 paParms, rc)); 1051 1076 rc = VINF_HGCM_ASYNC_EXECUTE; … … 1238 1263 case GET_NOTIFICATION: 1239 1264 LogFlowFunc(("GET_NOTIFICATION\n")); 1240 rc = getNotification( callHandle, cParms, paParms);1265 rc = getNotification(u32ClientID, callHandle, cParms, paParms); 1241 1266 break; 1242 1267
Note:
See TracChangeset
for help on using the changeset viewer.