VirtualBox

Changeset 100481 in vbox


Ignore:
Timestamp:
Jul 10, 2023 4:56:48 PM (17 months ago)
Author:
vboxsync
Message:

Shared Clipboard: Some more (optional / verbose release) logging. bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp

    r100467 r100481  
    680680    AssertPtrReturn(pListEntry, false);
    681681
    682     if (!shclTransferListEntryNameIsValid(pListEntry->pszName, pListEntry->cbName))
    683         return false;
    684 
    685     if (pListEntry->cbInfo) /* cbInfo / pvInfo is optional. */
    686     {
    687         if (!pListEntry->pvInfo)
    688             return false;
    689     }
    690 
    691     return true;
     682    bool fValid = false;
     683
     684    if (shclTransferListEntryNameIsValid(pListEntry->pszName, pListEntry->cbName))
     685    {
     686        fValid =    pListEntry->cbInfo == 0 /* cbInfo / pvInfo is optional. */
     687                 || pListEntry->pvInfo != NULL;
     688    }
     689
     690    if (!fValid)
     691        LogRel2(("Shared Clipboard: List entry '%s' is invalid\n", pListEntry->pszName));
     692
     693    return fValid;
    692694}
    693695
     
    897899        rc = VERR_NOT_SUPPORTED;
    898900
     901    if (RT_FAILURE(rc))
     902         LogRel(("Shared Clipboard: Opening object '%s' (flags %#x) failed with %Rrc\n",
     903                 pOpenCreateParms->pszPath, pOpenCreateParms->fCreate, rc));
     904
    899905    LogFlowFuncLeaveRC(rc);
    900906    return rc;
     
    917923    else
    918924        rc = VERR_NOT_SUPPORTED;
     925
     926    if (RT_FAILURE(rc))
     927        LogRel(("Shared Clipboard: Reading object 0x%x failed with %Rrc\n", hObj, rc));
    919928
    920929    LogFlowFuncLeaveRC(rc);
     
    948957        rc = VERR_NOT_SUPPORTED;
    949958
     959    if (RT_FAILURE(rc))
     960        LogRel(("Shared Clipboard: Reading object 0x%x failed with %Rrc\n", hObj, rc));
     961
    950962    LogFlowFuncLeaveRC(rc);
    951963    return rc;
     
    976988    else
    977989        rc = VERR_NOT_SUPPORTED;
     990
     991    if (RT_FAILURE(rc))
     992        LogRel(("Shared Clipboard: Writing object 0x%x failed with %Rrc\n", hObj, rc));
    978993
    979994    LogFlowFuncLeaveRC(rc);
     
    13031318        rc = VERR_NOT_SUPPORTED;
    13041319
     1320    if (RT_FAILURE(rc))
     1321         LogRel(("Shared Clipboard: Opening list '%s' (fiter '%s', flags %#x) failed with %Rrc\n",
     1322                 pOpenParms->pszPath, pOpenParms->pszFilter, pOpenParms->fList, rc));
     1323
    13051324    LogFlowFuncLeaveRC(rc);
    13061325    return rc;
     
    13271346        rc = VERR_NOT_SUPPORTED;
    13281347
     1348    if (RT_FAILURE(rc))
     1349        LogRel(("Shared Clipboard: Closing list 0x%x entry failed with %Rrc\n", hList, rc));
     1350
    13291351    LogFlowFuncLeaveRC(rc);
    13301352    return rc;
     
    13531375        rc = VERR_NOT_SUPPORTED;
    13541376
     1377    if (RT_FAILURE(rc))
     1378        LogRel(("Shared Clipboard: Reading list header list 0x%x entry failed with %Rrc\n", hList, rc));
     1379
    13551380    LogFlowFuncLeaveRC(rc);
    13561381    return rc;
     
    14201445        rc = VERR_NOT_SUPPORTED;
    14211446
     1447    if (RT_FAILURE(rc))
     1448        LogRel(("Shared Clipboard: Reading list for list 0x%x entry failed with %Rrc\n", hList, rc));
     1449
    14221450    LogFlowFuncLeaveRC(rc);
    14231451    return rc;
     
    14431471        rc = pTransfer->ProviderIface.pfnListEntryWrite(&pTransfer->ProviderCtx, hList, pEntry);
    14441472#endif
     1473
     1474    if (RT_FAILURE(rc))
     1475        LogRel(("Shared Clipboard: Writing list entry to list 0x%x failed with %Rrc\n", hList, rc));
    14451476
    14461477    LogFlowFuncLeaveRC(rc);
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