VirtualBox

Changeset 86959 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Nov 23, 2020 11:25:53 AM (4 years ago)
Author:
vboxsync
Message:

Shared Clipboard: Convert VBox clipboard formats to strings to improve logging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc.cpp

    r86912 r86959  
    12131213        fFormats &= ~fFormat;
    12141214
     1215#ifdef LOG_ENABLED
     1216        char *pszFmt = ShClFormatsToStrA(fFormat);
     1217        AssertPtrReturn(pszFmt, VERR_NO_MEMORY);
     1218        LogRel2(("Shared Clipboard: Requesting guest clipboard data in format '%s'\n", pszFmt));
     1219        RTStrFree(pszFmt);
     1220#endif
    12151221        /*
    12161222         * Allocate messages, one for each format.
     
    13891395    if (!(g_fTransferMode & VBOX_SHCL_TRANSFER_MODE_ENABLED))
    13901396    {
    1391         LogFlowFunc(("fFormats=%#x -> %#x\n", fFormats, fFormats & ~VBOX_SHCL_FMT_URI_LIST));
    13921397        fFormats &= ~VBOX_SHCL_FMT_URI_LIST;
    13931398    }
     1399    else
     1400        LogRel2(("Shared Clipboard: Warning: File transfers are disabled, ignoring\n"));
    13941401#endif
    1395     LogRel2(("Shared Clipboard: Reporting formats %#x to guest\n", fFormats));
     1402
     1403#ifdef LOG_ENABLED
     1404    char *pszFmts = ShClFormatsToStrA(fFormats);
     1405    AssertPtrReturn(pszFmts, VERR_NO_MEMORY);
     1406    LogRel2(("Shared Clipboard: Reporting formats '%s' to guest\n", pszFmts));
     1407    RTStrFree(pszFmts);
     1408#endif
    13961409
    13971410    /*
     
    15081521            else
    15091522            {
     1523#ifdef LOG_ENABLED
     1524                char *pszFmts = ShClFormatsToStrA(fFormats);
     1525                AssertPtrReturn(pszFmts, VERR_NO_MEMORY);
     1526                LogRel2(("Shared Clipboard: Guest reported formats '%s' to host\n", pszFmts));
     1527                RTStrFree(pszFmts);
     1528#endif
    15101529                rc = ShClBackendFormatAnnounce(pClient, fFormats);
    15111530                if (RT_FAILURE(rc))
     
    16061625    }
    16071626
    1608     LogRel2(("Shared Clipboard: Guest wants to read %RU32 bytes host clipboard data in format %RU32\n", cbData, uFormat));
     1627#ifdef LOG_ENABLED
     1628    char *pszFmt = ShClFormatsToStrA(uFormat);
     1629    AssertPtrReturn(pszFmt, VERR_NO_MEMORY);
     1630    LogRel2(("Shared Clipboard: Guest wants to read %RU32 bytes host clipboard data in format '%s'\n", cbData, pszFmt));
     1631    RTStrFree(pszFmt);
     1632#endif
    16091633
    16101634    /*
     
    17961820    }
    17971821
    1798     LogRel2(("Shared Clipboard: Guest writes %RU32 bytes clipboard data in format %RU32 to host\n", cbData, uFormat));
     1822#ifdef LOG_ENABLED
     1823    char *pszFmt = ShClFormatsToStrA(uFormat);
     1824    AssertPtrReturn(pszFmt, VERR_NO_MEMORY);
     1825    LogRel2(("Shared Clipboard: Guest writes %RU32 bytes clipboard data in format '%s' to host\n", cbData, pszFmt));
     1826    RTStrFree(pszFmt);
     1827#endif
    17991828
    18001829    /*
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