[glib/wip/pwithnall/converter-stream-debugging] WIP



commit a5fe9c0db162a6afd9e105664697966e87700347
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Apr 5 16:22:31 2022 +0100

    WIP
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 gio/tests/converter-stream.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gio/tests/converter-stream.c b/gio/tests/converter-stream.c
index 6a9f1f0873..9676a2c0a4 100644
--- a/gio/tests/converter-stream.c
+++ b/gio/tests/converter-stream.c
@@ -235,6 +235,8 @@ g_compressor_converter_convert (GConverter *converter,
        {
          if (*bytes_read > 0)
            break;
+g_message ("%s: inbuf_size %lu, outbuf_size %lu, flags %d, *bytes_read %lu, *bytes_written %lu, in_end - in 
%lu, block_size %lu",
+           G_STRFUNC, inbuf_size, outbuf_size, flags, *bytes_read, *bytes_written, in_end - in, block_size);
          g_set_error_literal (error, G_IO_ERROR,
                               G_IO_ERROR_PARTIAL_INPUT,
                               "Need more data");
@@ -258,6 +260,8 @@ g_compressor_converter_convert (GConverter *converter,
        {
          if (*bytes_read > 0)
            break;
+g_message ("%s: v %u, inbuf_size %lu, outbuf_size %lu, flags %d, *bytes_read %lu, *bytes_written %lu, in_end 
- in %lu, block_size %lu",
+           G_STRFUNC, v, inbuf_size, outbuf_size, flags, *bytes_read, *bytes_written, in_end - in, 
block_size);
          g_set_error_literal (error, G_IO_ERROR,
                               G_IO_ERROR_PARTIAL_INPUT,
                               "Need more data");
@@ -270,8 +274,10 @@ g_compressor_converter_convert (GConverter *converter,
       *bytes_written += 1;
     }
 
-  if (in == in_end && (flags & G_CONVERTER_INPUT_AT_END))
+  if (in == in_end && (flags & G_CONVERTER_INPUT_AT_END)) {
+    g_message ("%s: converter finished", G_STRFUNC);
     return G_CONVERTER_FINISHED;
+  }
   return G_CONVERTER_CONVERTED;
 }
 


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