VirtualBox

Changeset 29202 in vbox for trunk/src


Ignore:
Timestamp:
May 7, 2010 12:38:59 PM (15 years ago)
Author:
vboxsync
Message:

VBoxService: Don't terminate if some HGCM host service is not available on the host.

Location:
trunk/src/VBox/Additions/common/VBoxService
Files:
2 edited

Legend:

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

    r29020 r29202  
    310310            if (RT_FAILURE(rc))
    311311            {
    312                 VBoxServiceError("Service '%s' failed to initialize: %Rrc\n",
    313                                  g_aServices[j].pDesc->pszName, rc);
    314                 return rc;
     312                /*
     313                 * If a service uses some sort of HGCM host service
     314                 * which is not available on the host (maybe because the host
     315                 * is using an older VBox version), just disable that service
     316                 * here.
     317                 */
     318                if (rc == VERR_HGCM_SERVICE_NOT_FOUND)
     319                {
     320                    g_aServices[j].fEnabled = false;
     321                    VBoxServiceVerbose(0, "Service '%s' was disabled (because %Rrc)\n",
     322                                       g_aServices[j].pDesc->pszName, rc);
     323                }
     324                else
     325                {
     326                    VBoxServiceError("Service '%s' failed to initialize: %Rrc\n",
     327                                     g_aServices[j].pDesc->pszName, rc);
     328                    return rc;
     329                }
    315330            }
    316331        }
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp

    r29021 r29202  
    8181    rc = VbglR3GuestCtrlConnect(&g_GuestControlSvcClientID);
    8282    if (RT_SUCCESS(rc))
     83    {
    8384        VBoxServiceVerbose(3, "Control: Service Client ID: %#x\n", g_GuestControlSvcClientID);
     85
     86        /* Init thread list. */
     87        RTListInit(&g_GuestControlExecThreads);
     88    }
    8489    else
    8590    {
    86         VBoxServiceError("Control: Failed to connect to the guest control service! Error: %Rrc\n", rc);
     91        if (rc == VERR_HGCM_SERVICE_NOT_FOUND) /* Host service is not available; that's not fatal. */
     92            VBoxServiceVerbose(0, "Guest control service is not available\n");
     93        else
     94            VBoxServiceError("Control: Failed to connect to the guest control service! Error: %Rrc\n", rc);
    8795        RTSemEventMultiDestroy(g_hControlEvent);
    8896        g_hControlEvent = NIL_RTSEMEVENTMULTI;
    8997    }
    90 
    91     /* Init thread list. */
    92     RTListInit(&g_GuestControlExecThreads);
    9398    return rc;
    9499}
     
    147152    }
    148153
    149     VBoxServiceVerbose(4, "Control: VBoxServiceControlHandleCmdStartProcess returned with %Rrc\n", rc);
     154    VBoxServiceVerbose(3, "Control: VBoxServiceControlHandleCmdStartProcess returned with %Rrc\n", rc);
    150155    return rc;
    151156}
     
    210215            rc = VERR_NOT_FOUND; /* PID not found! */
    211216    }
    212     VBoxServiceVerbose(4, "Control: VBoxServiceControlHandleCmdGetOutput returned with %Rrc\n", rc);
     217    VBoxServiceVerbose(3, "Control: VBoxServiceControlHandleCmdGetOutput returned with %Rrc\n", rc);
    213218    return rc;
    214219}
     
    236241        uint32_t uMsg;
    237242        uint32_t uNumParms;
    238         VBoxServiceVerbose(4, "Control: Waiting for host msg ...\n");
     243        VBoxServiceVerbose(3, "Control: Waiting for host msg ...\n");
    239244        rc = VbglR3GuestCtrlGetHostMsg(g_GuestControlSvcClientID, &uMsg, &uNumParms, 1000 /* 1s timeout */);
    240245        if (RT_FAILURE(rc))
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