VirtualBox

Changeset 102461 in vbox for trunk/src/VBox/Additions/x11


Ignore:
Timestamp:
Dec 5, 2023 8:32:38 AM (15 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160604
Message:

Shared Clipboard: Make sure to check the event's rc when waiting for ShClX11ReadDataFromX11Async() to complete. bugref:10384

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard-x11.cpp

    r100676 r102461  
    8686                if (RT_SUCCESS(rc))
    8787                {
     88                    int               rcEvent;
    8889                    PSHCLEVENTPAYLOAD pPayload;
    89                     rc = ShClEventWait(pEvent, SHCL_TIMEOUT_DEFAULT_MS, &pPayload);
     90                    rc = ShClEventWaitEx(pEvent, SHCL_TIMEOUT_DEFAULT_MS, &rcEvent, &pPayload);
    9091                    if (RT_SUCCESS(rc))
    9192                    {
     
    103104                            ShClPayloadFree(pPayload);
    104105                        }
     106                        else /* No payload given; could happen on invalid / not-expected formats. */
     107                            *pcbActual = 0;
    105108                    }
     109                    else if (rc == VERR_SHCLPB_EVENT_FAILED)
     110                        rc = rcEvent;
    106111                }
    107112            }
     
    547552                        if (RT_SUCCESS(rc))
    548553                        {
     554                            int               rcEvent;
    549555                            PSHCLEVENTPAYLOAD pPayload;
    550                             rc = ShClEventWait(pReadDataEvent, SHCL_TIMEOUT_DEFAULT_MS, &pPayload);
     556                            rc = ShClEventWaitEx(pReadDataEvent, SHCL_TIMEOUT_DEFAULT_MS, &rcEvent, &pPayload);
    551557                            if (RT_SUCCESS(rc))
    552558                            {
     
    564570                                    ShClPayloadFree(pPayload);
    565571                                }
     572                                else /* No payload given; could happen on invalid / not-expected formats. */
     573                                    *pcbActual = 0;
    566574                            }
     575                            else if (rc == VERR_SHCLPB_EVENT_FAILED)
     576                                rc = rcEvent;
    567577                        }
    568578
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette