VirtualBox

Changeset 75722 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Nov 25, 2018 6:41:27 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126921
Message:

VBoxServiceControl: Don't count VERR_INTERRUPTED into the VbglR3GuestCtrlMsgWaitFor failures, nor should we sleep for a 1 second on these. No else{} after continue/break.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp

    r69500 r75722  
    248248    for (;;)
    249249    {
    250         VGSvcVerbose(3, "Waiting for host msg ...\n");
     250        VGSvcVerbose(3, "GstCtrl: Waiting for host msg ...\n");
    251251        uint32_t uMsg = 0;
    252252        uint32_t cParms = 0;
     
    255255        {
    256256#ifdef DEBUG
    257             VGSvcVerbose(4, "Message requires %ld parameters, but only 2 supplied -- retrying request (no error!)...\n",
     257            VGSvcVerbose(4, "Message requires %u parameters, but only 2 supplied -- retrying request (no error!)...\n",
    258258                         cParms);
    259259#endif
     
    263263        {
    264264            /* Note: VERR_GEN_IO_FAILURE seems to be normal if ran into timeout. */
    265             VGSvcError("Getting host message failed with %Rrc\n", rc);
     265            VGSvcError("GstCtrl: Getting host message failed with %Rrc\n", rc);
    266266
    267267            /* Check for VM session change. */
     
    271271                && (idNewSession != g_idControlSession))
    272272            {
    273                 VGSvcVerbose(1, "The VM session ID changed\n");
     273                VGSvcVerbose(1, "GstCtrl: The VM session ID changed\n");
    274274                g_idControlSession = idNewSession;
    275275
     
    288288                    continue; /* Skip waiting. */
    289289                }
    290                 else
    291                 {
    292                     VGSvcError("Unable to re-connect to HGCM service, rc=%Rrc, bailing out\n", rc);
    293                     break;
    294                 }
     290                VGSvcError("Unable to re-connect to HGCM service, rc=%Rrc, bailing out\n", rc);
     291                break;
    295292            }
    296293
    297             if (++cRetrievalFailed > 16) /** @todo Make this configurable? */
     294            if (rc == VERR_INTERRUPTED)
     295                RTThreadYield();        /* To be on the safe side... */
     296            else if (++cRetrievalFailed <= 16) /** @todo Make this configurable? */
     297                RTThreadSleep(1000);    /* Wait a bit before retrying. */
     298            else
    298299            {
    299300                VGSvcError("Too many failed attempts in a row to get next message, bailing out\n");
    300301                break;
    301302            }
    302 
    303             RTThreadSleep(1000); /* Wait a bit before retrying. */
    304303        }
    305304
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