Changeset 102461 in vbox
- Timestamp:
- Dec 5, 2023 8:32:38 AM (10 months ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
-
Additions/x11/VBoxClient/clipboard-x11.cpp (modified) (4 diffs)
-
GuestHost/SharedClipboard/clipboard-x11.cpp (modified) (3 diffs)
-
HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/clipboard-x11.cpp
r100676 r102461 86 86 if (RT_SUCCESS(rc)) 87 87 { 88 int rcEvent; 88 89 PSHCLEVENTPAYLOAD pPayload; 89 rc = ShClEventWait (pEvent, SHCL_TIMEOUT_DEFAULT_MS, &pPayload);90 rc = ShClEventWaitEx(pEvent, SHCL_TIMEOUT_DEFAULT_MS, &rcEvent, &pPayload); 90 91 if (RT_SUCCESS(rc)) 91 92 { … … 103 104 ShClPayloadFree(pPayload); 104 105 } 106 else /* No payload given; could happen on invalid / not-expected formats. */ 107 *pcbActual = 0; 105 108 } 109 else if (rc == VERR_SHCLPB_EVENT_FAILED) 110 rc = rcEvent; 106 111 } 107 112 } … … 547 552 if (RT_SUCCESS(rc)) 548 553 { 554 int rcEvent; 549 555 PSHCLEVENTPAYLOAD pPayload; 550 rc = ShClEventWait (pReadDataEvent, SHCL_TIMEOUT_DEFAULT_MS, &pPayload);556 rc = ShClEventWaitEx(pReadDataEvent, SHCL_TIMEOUT_DEFAULT_MS, &rcEvent, &pPayload); 551 557 if (RT_SUCCESS(rc)) 552 558 { … … 564 570 ShClPayloadFree(pPayload); 565 571 } 572 else /* No payload given; could happen on invalid / not-expected formats. */ 573 *pcbActual = 0; 566 574 } 575 else if (rc == VERR_SHCLPB_EVENT_FAILED) 576 rc = rcEvent; 567 577 } 568 578 -
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r100684 r102461 2319 2319 PSHCLEVENTPAYLOAD pPayload = NULL; 2320 2320 size_t cbResp = sizeof(SHCLX11RESPONSE); 2321 PSHCLX11RESPONSE pResp = (PSHCLX11RESPONSE)RTMemAlloc (cbResp);2321 PSHCLX11RESPONSE pResp = (PSHCLX11RESPONSE)RTMemAllocZ(cbResp); 2322 2322 if (pResp) 2323 2323 { … … 2615 2615 if (RT_SUCCESS(rc)) 2616 2616 { 2617 int rcEvent; 2617 2618 PSHCLEVENTPAYLOAD pPayload; 2618 rc = ShClEventWait (pEvent, msTimeout, &pPayload);2619 rc = ShClEventWaitEx(pEvent, msTimeout, &rcEvent, &pPayload); 2619 2620 if (RT_SUCCESS(rc)) 2620 2621 { … … 2632 2633 ShClPayloadFree(pPayload); 2633 2634 } 2635 else /* No payload given; could happen on invalid / not-expected formats. */ 2636 *pcbRead = 0; 2634 2637 } 2638 else if (rc == VERR_SHCLPB_EVENT_FAILED) 2639 rc = rcEvent; 2635 2640 } 2636 2641 } -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r100676 r102461 300 300 if (RT_SUCCESS(rc)) 301 301 { 302 int rcEvent; 302 303 PSHCLEVENTPAYLOAD pPayload; 303 rc = ShClEventWait (pEvent, SHCL_TIMEOUT_DEFAULT_MS, &pPayload);304 rc = ShClEventWaitEx(pEvent, SHCL_TIMEOUT_DEFAULT_MS, &rcEvent, &pPayload); 304 305 if (RT_SUCCESS(rc)) 305 306 { … … 327 328 *pcbActual = 0; 328 329 } 330 else if (rc == VERR_SHCLPB_EVENT_FAILED) 331 rc = rcEvent; 329 332 } 330 333 … … 722 725 { 723 726 /* X supplies the data asynchronously, so we need to wait for data to arrive first. */ 727 int rcEvent; 724 728 PSHCLEVENTPAYLOAD pPayload; 725 rc = ShClEventWait (pEvent, SHCL_TIMEOUT_DEFAULT_MS, &pPayload);729 rc = ShClEventWaitEx(pEvent, SHCL_TIMEOUT_DEFAULT_MS, &rcEvent, &pPayload); 726 730 if (RT_SUCCESS(rc)) 727 731 { … … 744 748 pPayload = NULL; 745 749 } 746 else 747 rc = VERR_NO_DATA; /* No payload. */750 else /* No payload given; could happen on invalid / not-expected formats. */ 751 *pcbActual = 0; 748 752 } 753 else if (rc == VERR_SHCLPB_EVENT_FAILED) 754 rc = rcEvent; 749 755 } 750 756
Note:
See TracChangeset
for help on using the changeset viewer.

