rygel r455 - trunk/src/rygel



Author: zeeshanak
Date: Sun Jan 18 19:28:13 2009
New Revision: 455
URL: http://svn.gnome.org/viewvc/rygel?rev=455&view=rev

Log:
Close the InputStream asynchronously.

Modified:
   trunk/src/rygel/rygel-interactive-response.vala

Modified: trunk/src/rygel/rygel-interactive-response.vala
==============================================================================
--- trunk/src/rygel/rygel-interactive-response.vala	(original)
+++ trunk/src/rygel/rygel-interactive-response.vala	Sun Jan 18 19:28:13 2009
@@ -108,8 +108,17 @@
 
         this.push_data (this.buffer, this.length);
 
+        input_stream.close_async (Priority.DEFAULT,
+                                  null,
+                                  on_input_stream_closed);
+    }
+
+    private void on_input_stream_closed (GLib.Object      source_object,
+                                         GLib.AsyncResult result) {
+        FileInputStream input_stream = (FileInputStream) source_object;
+
         try  {
-            input_stream.close (null);
+            input_stream.close_finish (result);
         } catch (Error err) {
             warning ("Failed to close stream to URI %s: %s\n",
                      this.file.get_uri (),



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