[wing/wip/nacho/poll-stream] More fixes



commit dd04e5fa3e73048db6e7aea9e33e796282ba438f
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Thu Nov 29 10:09:25 2018 +0100

    More fixes

 wing/wingoutputstream.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/wing/wingoutputstream.c b/wing/wingoutputstream.c
index 5c2caeb..fb0ca83 100644
--- a/wing/wingoutputstream.c
+++ b/wing/wingoutputstream.c
@@ -145,7 +145,7 @@ write_internal (GOutputStream  *stream,
   if (g_cancellable_set_error_if_cancelled (cancellable, error))
     return -1;
 
-  if (!blocking && g_pollable_output_stream_is_writable (G_POLLABLE_INPUT_STREAM (stream)))
+  if (!blocking && g_pollable_output_stream_is_writable (G_POLLABLE_OUTPUT_STREAM (stream)))
     {
       gboolean result;
 
@@ -159,7 +159,7 @@ write_internal (GOutputStream  *stream,
 
       ResetEvent (priv->overlap.hEvent);
 
-      retval = nread;
+      retval = nwritten;
       goto end;
     }
 
@@ -192,7 +192,7 @@ write_internal (GOutputStream  *stream,
                                                          &priv->overlap,
                                                          &nwritten, cancellable))
             {
-              retval = nread;
+              retval = nwritten;
               goto end;
             }
         }


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