Changeset 75986 in vbox
- Timestamp:
- Dec 5, 2018 5:40:31 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/GuestProperties/service.cpp
r75985 r75986 430 430 int getNotification(uint32_t u32ClientId, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]); 431 431 int getOldNotificationInternal(const char *pszPattern, uint64_t nsTimestamp, Property *pProp); 432 int getNotificationWriteOut(uint32_t cParms, VBOXHGCMSVCPARM paParms[], Property prop);432 int getNotificationWriteOut(uint32_t cParms, VBOXHGCMSVCPARM paParms[], Property const &prop); 433 433 int doNotifications(const char *pszProperty, uint64_t nsTimestamp); 434 434 int notifyHost(const char *pszName, const char *pszValue, uint64_t nsTimestamp, const char *pszFlags); … … 1079 1079 1080 1080 /** Helper query used by getNotification */ 1081 int Service::getNotificationWriteOut(uint32_t cParms, VBOXHGCMSVCPARM paParms[], Property prop)1081 int Service::getNotificationWriteOut(uint32_t cParms, VBOXHGCMSVCPARM paParms[], Property const &rProp) 1082 1082 { 1083 1083 AssertReturn(cParms == 4, VERR_INVALID_PARAMETER); /* Basic sanity checking. */ … … 1090 1090 { 1091 1091 char szFlags[GUEST_PROP_MAX_FLAGS_LEN]; 1092 rc = GuestPropWriteFlags( prop.mFlags, szFlags);1092 rc = GuestPropWriteFlags(rProp.mFlags, szFlags); 1093 1093 if (RT_SUCCESS(rc)) 1094 1094 { 1095 HGCMSvcSetU64(&paParms[1], prop.mTimestamp);1095 HGCMSvcSetU64(&paParms[1], rProp.mTimestamp); 1096 1096 1097 1097 size_t const cbFlags = strlen(szFlags) + 1; 1098 size_t const cbName = prop.mName.length() + 1;1099 size_t const cbValue = prop.mValue.length() + 1;1098 size_t const cbName = rProp.mName.length() + 1; 1099 size_t const cbValue = rProp.mValue.length() + 1; 1100 1100 size_t const cbNeeded = cbName + cbValue + cbFlags; 1101 1101 HGCMSvcSetU32(&paParms[3], (uint32_t)cbNeeded); 1102 1102 if (cbNeeded <= cbBuf) 1103 1103 { 1104 memcpy(pchBuf, prop.mName.c_str(), cbName);1104 memcpy(pchBuf, rProp.mName.c_str(), cbName); 1105 1105 pchBuf += cbName; 1106 memcpy(pchBuf, prop.mValue.c_str(), cbValue);1106 memcpy(pchBuf, rProp.mValue.c_str(), cbValue); 1107 1107 pchBuf += cbValue; 1108 1108 memcpy(pchBuf, szFlags, cbFlags);
Note:
See TracChangeset
for help on using the changeset viewer.

