[gvfs] Implement support for g_cancellable_release_fd()



commit 2179b65e49860813e36d7ee21618cabeb2f260cb
Author: Benjamin Otte <otte gnome org>
Date:   Tue Aug 11 17:48:10 2009 +0200

    Implement support for g_cancellable_release_fd()
    
    See bug 591388 and documentation for g_cancellable_release_fd() for a
    rationale.
    
    This fix requires glib git master.

 client/gvfsdaemondbus.c     |    1 +
 daemon/soup-input-stream.c  |    1 +
 daemon/soup-output-stream.c |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/client/gvfsdaemondbus.c b/client/gvfsdaemondbus.c
index 4675d4f..0999eb0 100644
--- a/client/gvfsdaemondbus.c
+++ b/client/gvfsdaemondbus.c
@@ -804,6 +804,7 @@ _g_vfs_daemon_call_sync (DBusMessage *message,
 
       reply = dbus_pending_call_steal_reply (pending);
       dbus_pending_call_unref (pending);
+      g_cancellable_release_fd (cancellable);
     }
   else
     {
diff --git a/daemon/soup-input-stream.c b/daemon/soup-input-stream.c
index ce3fa93..facce17 100644
--- a/daemon/soup-input-stream.c
+++ b/daemon/soup-input-stream.c
@@ -369,6 +369,7 @@ soup_input_stream_done_io (GInputStream *stream)
     {
       g_source_destroy (priv->cancel_watch);
       priv->cancel_watch = NULL;
+      g_cancellable_release_fd (priv->cancellable);
     }
   priv->cancellable = NULL;
 
diff --git a/daemon/soup-output-stream.c b/daemon/soup-output-stream.c
index 86ff8a4..3c83440 100644
--- a/daemon/soup-output-stream.c
+++ b/daemon/soup-output-stream.c
@@ -230,6 +230,7 @@ soup_output_stream_done_io (GOutputStream *stream)
     {
       g_source_destroy (priv->cancel_watch);
       priv->cancel_watch = NULL;
+      g_cancellable_release_fd (priv->cancellable);
     }
   priv->cancellable = NULL;
 }



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