Changeset 102825 in vbox for trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
- Timestamp:
- Jan 10, 2024 5:43:29 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp
r102824 r102825 2664 2664 2665 2665 /** 2666 * Reads the X11 clipboard.2666 * Reads from the X11 clipboard. 2667 2667 * 2668 2668 * @returns VBox status code. … … 2675 2675 * @param pvBuf Where to store the received data on success. 2676 2676 * @param cbBuf Size (in bytes) of \a pvBuf. Also marks maximum data to read (in bytes). 2677 * @param pcbRead Where to return the read bytes on success. 2677 * @param pcbRead Where to return the read bytes on success. Optional. 2678 2678 */ 2679 2679 int ShClX11ReadDataFromX11(PSHCLX11CTX pCtx, PSHCLEVENTSOURCE pEventSource, RTMSINTERVAL msTimeout, … … 2684 2684 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 2685 2685 AssertReturn(cbBuf, VERR_INVALID_PARAMETER); 2686 AssertPtrReturn(pcbRead, VERR_INVALID_POINTER);2686 /* pcbRead is optional. */ 2687 2687 2688 2688 PSHCLEVENT pEvent; … … 2706 2706 2707 2707 memcpy(pvBuf, pResp->Read.pvData, RT_MIN(cbBuf, pResp->Read.cbData)); 2708 *pcbRead = pResp->Read.cbData; 2708 if (pcbRead) 2709 *pcbRead = pResp->Read.cbData; 2709 2710 2710 2711 RTMemFree(pResp->Read.pvData); … … 2716 2717 { 2717 2718 rc = VERR_NO_DATA; 2718 *pcbRead = 0; 2719 if (pcbRead) 2720 *pcbRead = 0; 2719 2721 } 2720 2722 } … … 2722 2724 rc = rcEvent; 2723 2725 } 2726 2727 ShClEventRelease(pEvent); 2724 2728 } 2725 2729 … … 2805 2809 return rc; 2806 2810 } 2807
Note:
See TracChangeset
for help on using the changeset viewer.