Index: /trunk/src/VBox/HostServices/GuestProperties/service.cpp
===================================================================
--- /trunk/src/VBox/HostServices/GuestProperties/service.cpp	(revision 75986)
+++ /trunk/src/VBox/HostServices/GuestProperties/service.cpp	(revision 75987)
@@ -60,6 +60,4 @@
 #include <list>
 
-/** @todo Delete the old !ASYNC_HOST_NOTIFY code and remove this define. */
-#define ASYNC_HOST_NOTIFY
 
 namespace guestProp {
@@ -321,8 +319,6 @@
         , mcTimestampAdjustments(0)
         , m_fSetHostVersionProps(false)
-#ifdef ASYNC_HOST_NOTIFY
         , mhThreadNotifyHost(NIL_RTTHREAD)
         , mhReqQNotifyHost(NIL_RTREQQUEUE)
-#endif
     { }
 
@@ -441,5 +437,4 @@
     static DECLCALLBACK(void) dbgInfo(void *pvUser, PCDBGFINFOHLP pHlp, const char *pszArgs);
 
-#ifdef ASYNC_HOST_NOTIFY
     /* Thread for handling host notifications. */
     RTTHREAD mhThreadNotifyHost;
@@ -447,5 +442,4 @@
     RTREQQUEUE mhReqQNotifyHost;
     static DECLCALLBACK(int) threadNotifyHost(RTTHREAD self, void *pvUser);
-#endif
 
     DECLARE_CLS_COPY_CTOR_ASSIGN_NOOP(Service);
@@ -1307,15 +1301,10 @@
 }
 
-#ifdef ASYNC_HOST_NOTIFY
-static DECLCALLBACK(void) notifyHostAsyncWorker(PFNHGCMSVCEXT pfnHostCallback,
-                                                void *pvHostData,
-                                                PGUESTPROPHOSTCALLBACKDATA pHostCallbackData)
-{
-    pfnHostCallback(pvHostData, 0 /*u32Function*/,
-                   (void *)pHostCallbackData,
-                   sizeof(GUESTPROPHOSTCALLBACKDATA));
+static DECLCALLBACK(void)
+notifyHostAsyncWorker(PFNHGCMSVCEXT pfnHostCallback, void *pvHostData, PGUESTPROPHOSTCALLBACKDATA pHostCallbackData)
+{
+    pfnHostCallback(pvHostData, 0 /*u32Function*/, (void *)pHostCallbackData, sizeof(GUESTPROPHOSTCALLBACKDATA));
     RTMemFree(pHostCallbackData);
 }
-#endif
 
 /**
@@ -1330,6 +1319,5 @@
 {
     LogFlowFunc(("pszName=%s, pszValue=%s, nsTimestamp=%llu, pszFlags=%s\n", pszName, pszValue, nsTimestamp, pszFlags));
-#ifdef ASYNC_HOST_NOTIFY
-    int rc = VINF_SUCCESS;
+    int rc;
 
     /* Allocate buffer for the callback data and strings. */
@@ -1375,15 +1363,4 @@
         rc = VERR_NO_MEMORY;
     }
-#else
-    GUESTPROPHOSTCALLBACKDATA HostCallbackData;
-    HostCallbackData.u32Magic     = GUESTPROPHOSTCALLBACKDATA_MAGIC;
-    HostCallbackData.pcszName     = pszName;
-    HostCallbackData.pcszValue    = pszValue;
-    HostCallbackData.nsTimestamp  = nsTimestamp;
-    HostCallbackData.pcszFlags    = pszFlags;
-    int rc = mpfnHostCallback(mpvHostData, 0 /*u32Function*/,
-                              (void *)(&HostCallbackData),
-                              sizeof(HostCallbackData));
-#endif
     LogFlowFunc(("returning rc=%Rrc\n", rc));
     return rc;
@@ -1698,6 +1675,4 @@
 
 
-#ifdef ASYNC_HOST_NOTIFY
-
 /* static */
 DECLCALLBACK(int) Service::threadNotifyHost(RTTHREAD hThreadSelf, void *pvUser)
@@ -1732,5 +1707,4 @@
 }
 
-#endif /* ASYNC_HOST_NOTIFY */
 
 int Service::initialize()
@@ -1760,5 +1734,4 @@
     }
 
-#ifdef ASYNC_HOST_NOTIFY
     /* The host notification thread and queue. */
     int rc = RTReqQueueCreate(&mhReqQNotifyHost);
@@ -1772,26 +1745,17 @@
                             RTTHREADFLAGS_WAITABLE,
                             "GSTPROPNTFY");
-    }
-
-    if (RT_FAILURE(rc))
-    {
-        if (mhReqQNotifyHost != NIL_RTREQQUEUE)
-        {
-            RTReqQueueDestroy(mhReqQNotifyHost);
-            mhReqQNotifyHost = NIL_RTREQQUEUE;
-        }
-    }
-#else  /* !ASYNC_HOST_NOTIFY */
-    int rc = VINF_SUCCESS;
-#endif /* !ASYNC_HOST_NOTIFY */
-
-    /* Finally debug stuff (ignore failures): */
-    if (RT_SUCCESS(rc))
-        HGCMSvcHlpInfoRegister(mpHelpers, "guestprops", "Display the guest properties", Service::dbgInfo, this);
-
+        if (RT_SUCCESS(rc))
+        {
+            /* Finally debug stuff (ignore failures): */
+            HGCMSvcHlpInfoRegister(mpHelpers, "guestprops", "Display the guest properties", Service::dbgInfo, this);
+            return rc;
+        }
+
+        RTReqQueueDestroy(mhReqQNotifyHost);
+        mhReqQNotifyHost = NIL_RTREQQUEUE;
+    }
     return rc;
 }
 
-#ifdef ASYNC_HOST_NOTIFY
 /**
  * @callback_method_impl{FNRTSTRSPACECALLBACK, Destroys Property.}
@@ -1805,5 +1769,4 @@
 }
 
-#endif
 
 int Service::uninit()
@@ -1812,5 +1775,4 @@
         HGCMSvcHlpInfoDeregister(mpHelpers, "guestprops");
 
-#ifdef ASYNC_HOST_NOTIFY
     if (mhReqQNotifyHost != NIL_RTREQQUEUE)
     {
@@ -1829,5 +1791,4 @@
         mhProperties = NULL;
     }
-#endif
     return VINF_SUCCESS;
 }
