- Timestamp:
- Jan 10, 2024 1:56:27 PM (13 months ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/clipboard-x11.cpp
r102468 r102818 337 337 if (RT_SUCCESS(rc)) 338 338 { 339 char *pszURL = NULL; 340 341 uint64_t const cRoots = ShClTransferRootsCount(pTransfer); 342 for (uint32_t i = 0; i < cRoots; i++) 343 { 344 char *pszEntry = ShClTransferHttpServerGetUrlA(pSrv, ShClTransferGetID(pTransfer), i /* Entry index */); 345 AssertPtrBreakStmt(pszEntry, rc = VERR_NO_MEMORY); 346 347 if (i > 0) 348 { 349 rc = RTStrAAppend(&pszURL, "\n"); /* Separate entries with a newline. */ 350 AssertRCBreak(rc); 351 } 352 353 rc = RTStrAAppend(&pszURL, pszEntry); 354 AssertRCBreak(rc); 355 356 RTStrFree(pszEntry); 357 } 358 339 char *pszData; 340 size_t cbData; 341 rc = ShClTransferHttpConvertToStringList(pSrv, pTransfer, &pszData, &cbData); 359 342 if (RT_SUCCESS(rc)) 360 343 { 361 *ppv = pszURL; 362 *pcb = strlen(pszURL) + 1 /* Include terminator */; 363 364 LogFlowFunc(("URL is '%s'\n", pszURL)); 365 366 /* ppv has ownership of pszURL. */ 344 *ppv = pszData; 345 *pcb = cbData; 346 /* ppv has ownership of pszData now. */ 367 347 } 368 348 } -
trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp
r102468 r102818 620 620 if (RT_SUCCESS(rc)) 621 621 { 622 char *pszURL = NULL; 623 624 uint64_t const cRoots = ShClTransferRootsCount(pTransfer); 625 for (uint32_t i = 0; i < cRoots; i++) 626 { 627 char *pszEntry = ShClTransferHttpServerGetUrlA(pHttpSrv, ShClTransferGetID(pTransfer), i /* Entry index */); 628 AssertPtrBreakStmt(pszEntry, rc = VERR_NO_MEMORY); 629 630 if (i > 0) 631 { 632 rc = RTStrAAppend(&pszURL, "\n"); /* Separate entries with a newline. */ 633 AssertRCBreak(rc); 634 } 635 636 rc = RTStrAAppend(&pszURL, pszEntry); 637 AssertRCBreak(rc); 638 639 RTStrFree(pszEntry); 640 } 641 622 char *pszData; 623 size_t cbData; 624 rc = ShClTransferHttpConvertToStringList(pHttpSrv, pTransfer, &pszData, &cbData); 642 625 if (RT_SUCCESS(rc)) 643 626 { 644 *ppv = pszURL; 645 *pcb = strlen(pszURL) + 1 /* Include terminator */; 646 647 LogFlowFunc(("URL is '%s'\n", pszURL)); 648 649 /* ppv has ownership of pszURL. */ 627 *ppv = pszData; 628 *pcb = cbData; 629 /* ppv has ownership of pszData now. */ 650 630 } 651 631 }
Note:
See TracChangeset
for help on using the changeset viewer.