VirtualBox

Ignore:
Timestamp:
Jul 19, 2021 1:48:09 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145776
Message:

HGCM,HostServices: Extended VBOXHGCMSVCFNTABLE with client and call limits. Tried to pick reasonable values for all services. bugref:9379

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/DragAndDrop/VBoxDragAndDropSvc.cpp

    r86869 r90238  
    181181int DragAndDropService::init(VBOXHGCMSVCFNTABLE *pTable) RT_NOEXCEPT
    182182{
     183    /* Legacy clients map to the root category. */
     184    pTable->idxLegacyClientCategory = HGCM_CLIENT_CATEGORY_ROOT;
     185
     186    /* Limit to 255 clients (see also DragAndDropService::clientConnect). */
     187    for (uintptr_t i = 0; i < RT_ELEMENTS(pTable->acMaxClients); i++)
     188        pTable->acMaxClients[i] = UINT8_MAX;
     189
     190    /* Limit the number of concurrent calls to 256 (playing safe).  */
     191    /** @todo Properly determin the max number of pending/concurrent calls for DnD. */
     192    for (uintptr_t i = 0; i < RT_ELEMENTS(pTable->acMaxClients); i++)
     193        pTable->acMaxCallsPerClient[i] = 256;
     194
    183195    /* Register functions. */
    184196    pTable->pfnHostCall          = svcHostCall;
Note: See TracChangeset for help on using the changeset viewer.

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