[gvfs/gdbus: 19/30] gdbus: Only watch for name owner when monitor != NULL



commit 3e7b9b79a0b3c4e23c8ebd6d6665669a03cf9edd
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Fri May 11 11:24:58 2012 +0200

    gdbus: Only watch for name owner when monitor != NULL

 monitor/proxy/gvfsproxyvolumemonitordaemon.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/monitor/proxy/gvfsproxyvolumemonitordaemon.c b/monitor/proxy/gvfsproxyvolumemonitordaemon.c
index 4d449c2..253089b 100644
--- a/monitor/proxy/gvfsproxyvolumemonitordaemon.c
+++ b/monitor/proxy/gvfsproxyvolumemonitordaemon.c
@@ -1686,10 +1686,13 @@ handle_is_supported (GVfsRemoteVolumeMonitor *object,
   if (monitor == NULL)
     monitor_try_create ();
 
-  /* If someone is calling into this object and interface, start watching their name so
-   * we can cancel operations initiated by them when they disconnect
-   */
-  ensure_name_owner_changed_for_unique_name (invocation);
+  if (monitor != NULL)
+    {
+      /* If someone is calling into this object and interface, start watching their name so
+       * we can cancel operations initiated by them when they disconnect
+       */
+      ensure_name_owner_changed_for_unique_name (invocation);
+    }
   
   gvfs_remote_volume_monitor_complete_is_supported (object, invocation,
                                                     monitor != NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]