[gnio] Don't call things input_stream in the output stream



commit 79f43d3f6602ccb44db444251236b6a94fbf7ba8
Author: Alexander Larsson <alexl redhat com>
Date:   Tue May 12 09:45:51 2009 +0200

    Don't call things input_stream in the output stream
---
 gio/gsocketoutputstream.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/gio/gsocketoutputstream.c b/gio/gsocketoutputstream.c
index 20cddce..ddf7931 100644
--- a/gio/gsocketoutputstream.c
+++ b/gio/gsocketoutputstream.c
@@ -165,37 +165,37 @@ g_socket_output_stream_write_async (GOutputStream        *stream,
                                     GAsyncReadyCallback   callback,
                                     gpointer              user_data)
 {
-  GSocketOutputStream *input_stream = G_SOCKET_OUTPUT_STREAM (stream);
+  GSocketOutputStream *output_stream = G_SOCKET_OUTPUT_STREAM (stream);
 
-  g_assert (input_stream->priv->result == NULL);
+  g_assert (output_stream->priv->result == NULL);
 
-  input_stream->priv->result =
+  output_stream->priv->result =
     g_simple_async_result_new (G_OBJECT (stream), callback, user_data,
                                g_socket_output_stream_write_async);
   if (cancellable)
     g_object_ref (cancellable);
-  input_stream->priv->cancellable = cancellable;
-  input_stream->priv->buffer = buffer;
-  input_stream->priv->count = count;
+  output_stream->priv->cancellable = cancellable;
+  output_stream->priv->buffer = buffer;
+  output_stream->priv->count = count;
 
-  if (!g_socket_condition_check (input_stream->priv->socket, G_IO_OUT))
+  if (!g_socket_condition_check (output_stream->priv->socket, G_IO_OUT))
     {
       GSource *source;
 
-      input_stream->priv->from_mainloop = TRUE;
-      source = g_socket_create_source (input_stream->priv->socket,
+      output_stream->priv->from_mainloop = TRUE;
+      source = g_socket_create_source (output_stream->priv->socket,
                                        G_IO_OUT | G_IO_HUP | G_IO_ERR,
                                        cancellable);
       g_source_set_callback (source,
                              (GSourceFunc) g_socket_output_stream_write_ready,
-                             g_object_ref (input_stream), g_object_unref);
+                             g_object_ref (output_stream), g_object_unref);
       g_source_attach (source, NULL);
       g_source_unref (source);
     }
   else
     {
-      input_stream->priv->from_mainloop = FALSE;
-      g_socket_output_stream_write_ready (input_stream, G_IO_OUT);
+      output_stream->priv->from_mainloop = FALSE;
+      g_socket_output_stream_write_ready (output_stream, G_IO_OUT);
     }
 }
 



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