VirtualBox

Changeset 84732 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jun 9, 2020 7:15:54 AM (5 years ago)
Author:
vboxsync
Message:

Guest Control/VbglR3: Made initial session startup information a bit more lightweight by using the default values as initial size instead of maximum ones. bugref:9320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibGuestCtrl.cpp

    r84594 r84732  
    768768{
    769769    return VbglR3GuestCtrlSessionStartupInfoInitEx(pStartupInfo,
    770                                                    GUESTPROCESS_MAX_USER_LEN, GUESTPROCESS_MAX_PASSWORD_LEN,
    771                                                    GUESTPROCESS_MAX_DOMAIN_LEN);
     770                                                   GUESTPROCESS_DEFAULT_USER_LEN, GUESTPROCESS_DEFAULT_PASSWORD_LEN,
     771                                                   GUESTPROCESS_DEFAULT_DOMAIN_LEN);
    772772}
    773773
     
    11181118{
    11191119    return VbglR3GuestCtrlProcStartupInfoInitEx(pStartupInfo,
    1120                                                 GUESTPROCESS_MAX_CMD_LEN,
    1121                                                 GUESTPROCESS_MAX_USER_LEN,  GUESTPROCESS_MAX_PASSWORD_LEN,
    1122                                                 GUESTPROCESS_MAX_DOMAIN_LEN,
    1123                                                 GUESTPROCESS_MAX_ARGS_LEN, GUESTPROCESS_MAX_ENV_LEN);
     1120                                                GUESTPROCESS_DEFAULT_CMD_LEN,
     1121                                                GUESTPROCESS_DEFAULT_USER_LEN     /* Deprecated, now handled via session creation. */,
     1122                                                GUESTPROCESS_DEFAULT_PASSWORD_LEN /* Ditto. */,
     1123                                                GUESTPROCESS_DEFAULT_DOMAIN_LEN   /* Ditto. */,
     1124                                                GUESTPROCESS_DEFAULT_ARGS_LEN, GUESTPROCESS_DEFAULT_ENV_LEN);
    11241125}
    11251126
     
    12451246    }
    12461247
    1247     unsigned cRetries = 0;
    1248     unsigned cGrowthFactor = 2;
     1248    unsigned       cRetries      = 0;
     1249    const unsigned cMaxRetries   = 32; /* Should be enough for now. */
     1250    const unsigned cGrowthFactor = 2;  /* By how much the buffers will grow if they're too small yet. */
    12491251
    12501252    do
     
    12781280        {
    12791281            if (   rc == VERR_BUFFER_OVERFLOW
    1280                 && cRetries++ < 4)
     1282                && cRetries++ < cMaxRetries)
    12811283            {
    12821284#define GROW_STR(a_Str, a_cbMax) \
     
    12911293
    12921294#undef GROW_STR
    1293                 cGrowthFactor *= cGrowthFactor;
    12941295            }
    12951296            else
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