Changeset 85985 in vbox
- Timestamp:
- Sep 1, 2020 5:46:22 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 140181
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/SharedClipboard.h
r83624 r85985 175 175 SHCLEVENTID ShClEventIdGenerateAndRegister(PSHCLEVENTSOURCE pSource); 176 176 SHCLEVENTID ShClEventGetLast(PSHCLEVENTSOURCE pSource); 177 uint32_t ShClEventGetRefs(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent); 177 178 uint32_t ShClEventRetain(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent); 178 179 uint32_t ShClEventRelease(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent); -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp
r85864 r85985 259 259 return pEvent->idEvent; 260 260 261 return 0; 262 } 263 264 /** 265 * Returns the current reference count for a specific event. 266 * 267 * @returns Reference count. 268 * @param pSource Event source the specific event is part of. 269 * @param idEvent Event ID to return reference count for. 270 */ 271 uint32_t ShClEventGetRefs(PSHCLEVENTSOURCE pSource, SHCLEVENTID idEvent) 272 { 273 PSHCLEVENT pEvent = shclEventGet(pSource, idEvent); 274 if (pEvent) 275 return pEvent->cRefs; 276 277 AssertMsgFailed(("No event with %RU32\n", idEvent)); 261 278 return 0; 262 279 } -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp
r85983 r85985 1337 1337 if (RT_FAILURE(rc)) 1338 1338 ShClPayloadFree(pPayload); 1339 1340 /* No one holding a reference to the event event anymore? Unregister it. */ 1341 if (ShClEventGetRefs(&pClient->EventSrc, idEvent) == 0) 1342 { 1343 int rc2 = ShClEventUnregister(&pClient->EventSrc, idEvent); 1344 if (RT_SUCCESS(rc)) 1345 rc = rc2; 1346 } 1339 1347 } 1340 1348
Note:
See TracChangeset
for help on using the changeset viewer.