[glib] gunixoutputstream: add missing can_poll() implementation



commit 14eb3d3590b5c08626c4901b16e9695747d43188
Author: Dan Winship <danw gnome org>
Date:   Tue Jun 12 07:08:26 2012 -0400

    gunixoutputstream: add missing can_poll() implementation
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677770

 gio/gunixoutputstream.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gio/gunixoutputstream.c b/gio/gunixoutputstream.c
index abd14a4..4e00dcb 100644
--- a/gio/gunixoutputstream.c
+++ b/gio/gunixoutputstream.c
@@ -104,6 +104,7 @@ static gboolean g_unix_output_stream_close_finish (GOutputStream        *stream,
 						   GAsyncResult         *result,
 						   GError              **error);
 
+static gboolean g_unix_output_stream_pollable_can_poll      (GPollableOutputStream *stream);
 static gboolean g_unix_output_stream_pollable_is_writable   (GPollableOutputStream *stream);
 static GSource *g_unix_output_stream_pollable_create_source (GPollableOutputStream *stream,
 							     GCancellable         *cancellable);
@@ -165,6 +166,7 @@ g_unix_output_stream_class_init (GUnixOutputStreamClass *klass)
 static void
 g_unix_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface)
 {
+  iface->can_poll = g_unix_output_stream_pollable_can_poll;
   iface->is_writable = g_unix_output_stream_pollable_is_writable;
   iface->create_source = g_unix_output_stream_pollable_create_source;
 }
@@ -516,6 +518,12 @@ g_unix_output_stream_close_finish (GOutputStream  *stream,
 }
 
 static gboolean
+g_unix_output_stream_pollable_can_poll (GPollableOutputStream *stream)
+{
+  return G_UNIX_OUTPUT_STREAM (stream)->priv->is_pipe_or_socket;
+}
+
+static gboolean
 g_unix_output_stream_pollable_is_writable (GPollableOutputStream *stream)
 {
   GUnixOutputStream *unix_stream = G_UNIX_OUTPUT_STREAM (stream);



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