VirtualBox

Ignore:
Timestamp:
Mar 22, 2024 4:13:12 PM (11 months ago)
Author:
vboxsync
Message:

Guest Control/Main: Added a new define GSTCTL_DEFAULT_TIMEOUT_MS and replaced most of the hardcoded timeout values with it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestSessionImpl.cpp

    r104001 r104003  
    10791079        if (RT_SUCCESS(vrc))
    10801080        {
    1081             vrc = pEvent->Wait(30 * 1000);
     1081            vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    10821082            if (RT_SUCCESS(vrc))
    10831083            {
     
    12441244    if (RT_SUCCESS(vrc))
    12451245    {
    1246         vrc = pEvent->Wait(30 * 1000);
     1246        vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    12471247        if (pEvent->HasGuestError() && pvrcGuest)
    12481248            *pvrcGuest = pEvent->GuestResult();
     
    14001400        if (RT_SUCCESS(vrc))
    14011401        {
    1402             vrc = pEvent->Wait(30 * 1000);
     1402            vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    14031403            if (RT_SUCCESS(vrc))
    14041404            {
     
    18591859        if (RT_SUCCESS(vrc))
    18601860        {
    1861             vrc = pEvent->Wait(30 * 1000);
     1861            vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    18621862            if (RT_SUCCESS(vrc))
    18631863            {
     
    19901990    {
    19911991        int vrcGuest = VERR_IPE_UNINITIALIZED_STATUS;
    1992         vrc = pFile->i_open(30 * 1000 /* 30s timeout */, &vrcGuest);
     1992        vrc = pFile->i_open(GSTCTL_DEFAULT_TIMEOUT_MS, &vrcGuest);
    19931993        if (   vrc == VERR_GSTCTL_GUEST_ERROR
    19941994            && pvrcGuest)
     
    21412141        if (RT_SUCCESS(vrc))
    21422142        {
    2143             vrc = pEvent->Wait(30 * 1000);
     2143            vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    21442144            if (RT_SUCCESS(vrc))
    21452145            {
     
    22182218        if (RT_SUCCESS(vrc))
    22192219        {
    2220             vrc = pEvent->Wait(30 * 1000);
     2220            vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    22212221            if (RT_SUCCESS(vrc))
    22222222            {
     
    27962796    {
    27972797        vrc = i_waitForStatusChange(pEvent, GuestSessionWaitForFlag_Start,
    2798                                     30 * 1000 /* 30s timeout */,
    2799                                     NULL /* Session status */, pvrcGuest);
     2798                                    GSTCTL_DEFAULT_TIMEOUT_MS, NULL /* Session status */, pvrcGuest);
    28002799    }
    28012800    else
     
    30913090    if (RT_SUCCESS(vrc))
    30923091    {
    3093         vrc = pEvent->Wait(30 * 1000);
     3092        vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    30943093        if (pEvent->HasGuestError() && pvrcGuest)
    30953094            *pvrcGuest = pEvent->GuestResult();
     
    31343133    if (RT_SUCCESS(vrc))
    31353134    {
    3136         vrc = pEvent->Wait(30 * 1000);
     3135        vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    31373136        if (RT_SUCCESS(vrc))
    31383137        {
     
    31873186    if (RT_SUCCESS(vrc))
    31883187    {
    3189         vrc = pEvent->Wait(30 * 1000);
     3188        vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    31903189        if (RT_SUCCESS(vrc))
    31913190        {
     
    32373236    if (RT_SUCCESS(vrc))
    32383237    {
    3239         vrc = pEvent->Wait(30 * 1000);
     3238        vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    32403239        if (RT_SUCCESS(vrc))
    32413240        {
     
    36213620    if (RT_SUCCESS(vrc))
    36223621    {
    3623         vrc = pEvent->Wait(30 * 1000);
     3622        vrc = pEvent->Wait(GSTCTL_DEFAULT_TIMEOUT_MS);
    36243623        if (RT_FAILURE(vrc))
    36253624        {
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