Index: /trunk/src/VBox/HostServices/GuestControl/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/GuestControl/service.cpp	(revision 50824)
+++ /trunk/src/VBox/HostServices/GuestControl/service.cpp	(revision 50825)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2011-2013 Oracle Corporation
+ * Copyright (C) 2011-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -922,5 +922,5 @@
      * Simply deletes the service object
      */
-    static DECLCALLBACK(int) svcUnload (void *pvService)
+    static DECLCALLBACK(int) svcUnload(void *pvService)
     {
         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
@@ -937,7 +937,7 @@
      * Stub implementation of pfnConnect and pfnDisconnect.
      */
-    static DECLCALLBACK(int) svcConnect (void *pvService,
-                                         uint32_t u32ClientID,
-                                         void *pvClient)
+    static DECLCALLBACK(int) svcConnect(void *pvService,
+                                        uint32_t u32ClientID,
+                                        void *pvClient)
     {
         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
@@ -951,7 +951,7 @@
      * Stub implementation of pfnConnect and pfnDisconnect.
      */
-    static DECLCALLBACK(int) svcDisconnect (void *pvService,
-                                            uint32_t u32ClientID,
-                                            void *pvClient)
+    static DECLCALLBACK(int) svcDisconnect(void *pvService,
+                                           uint32_t u32ClientID,
+                                           void *pvClient)
     {
         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
@@ -965,11 +965,11 @@
      * Wraps to the call member function
      */
-    static DECLCALLBACK(void) svcCall (void * pvService,
-                                       VBOXHGCMCALLHANDLE callHandle,
-                                       uint32_t u32ClientID,
-                                       void *pvClient,
-                                       uint32_t u32Function,
-                                       uint32_t cParms,
-                                       VBOXHGCMSVCPARM paParms[])
+    static DECLCALLBACK(void) svcCall(void * pvService,
+                                      VBOXHGCMCALLHANDLE callHandle,
+                                      uint32_t u32ClientID,
+                                      void *pvClient,
+                                      uint32_t u32Function,
+                                      uint32_t cParms,
+                                      VBOXHGCMSVCPARM paParms[])
     {
         AssertLogRelReturnVoid(VALID_PTR(pvService));
@@ -983,8 +983,8 @@
      * Wraps to the hostCall member function
      */
-    static DECLCALLBACK(int) svcHostCall (void *pvService,
-                                          uint32_t u32Function,
-                                          uint32_t cParms,
-                                          VBOXHGCMSVCPARM paParms[])
+    static DECLCALLBACK(int) svcHostCall(void *pvService,
+                                         uint32_t u32Function,
+                                         uint32_t cParms,
+                                         VBOXHGCMSVCPARM paParms[])
     {
         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
@@ -998,7 +998,7 @@
      * Installs a host callback for notifications of property changes.
      */
-    static DECLCALLBACK(int) svcRegisterExtension (void *pvService,
-                                                   PFNHGCMSVCEXT pfnExtension,
-                                                   void *pvExtension)
+    static DECLCALLBACK(int) svcRegisterExtension(void *pvService,
+                                                  PFNHGCMSVCEXT pfnExtension,
+                                                  void *pvExtension)
     {
         AssertLogRelReturn(VALID_PTR(pvService), VERR_INVALID_PARAMETER);
@@ -1075,5 +1075,5 @@
     ClientStateMapIter itClientState = mClientStateMap.find(u32ClientID);
     AssertMsg(itClientState != mClientStateMap.end(),
-              ("Clients ID=%RU32 not found in client list when it should be there\n", u32ClientID));
+              ("Client ID=%RU32 not found in client list when it should be there\n", u32ClientID));
 
     if (itClientState != mClientStateMap.end())
@@ -1146,5 +1146,11 @@
                                                        u32ClientID));
     if (itClientState == mClientStateMap.end())
-        return VERR_NOT_FOUND; /* Should never happen. */
+    {
+        /* Should never happen. Complete the call on the guest side though. */
+        AssertPtr(mpHelpers);
+        mpHelpers->pfnCallComplete(callHandle, VERR_NOT_FOUND);
+
+        return VERR_NOT_FOUND;
+    }
 
     ClientState &clientState = itClientState->second;
@@ -1571,5 +1577,5 @@
 }
 
-int Service::uninit()
+int Service::uninit(void)
 {
     return VINF_SUCCESS;
