[glib] gio: callback_data is the task not the task data.



commit acfa6e233780a79664a62e5d4f1bf822b446017e
Author: Alban Browaeys <prahal yahoo com>
Date:   Wed Jan 16 00:04:58 2013 +0100

    gio: callback_data is the task not the task data.
    
    skip_callback_wrapper expect the user_data (callback_data)
    to be the task holding the task_data, not the task_data
    itself.
    Otherwise the task_data is cast as GTask and then task_data
    is extracted from this bogus task.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691812

 gio/ginputstream.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/ginputstream.c b/gio/ginputstream.c
index c6fa332..5fbf025 100644
--- a/gio/ginputstream.c
+++ b/gio/ginputstream.c
@@ -1234,7 +1234,7 @@ skip_callback_wrapper (GObject      *source_object,
                              data->buffer, MIN (8192, data->count),
                              g_task_get_priority (task),
                              g_task_get_cancellable (task),
-                             skip_callback_wrapper, data);
+                             skip_callback_wrapper, task);
 	  return;
 	}
     }
@@ -1293,7 +1293,7 @@ g_input_stream_real_skip_async (GInputStream        *stream,
       g_task_set_task_data (task, data, g_free);
       g_task_set_check_cancellable (task, FALSE);
       class->read_async (stream, data->buffer, MIN (8192, count), io_priority, cancellable,
-			 skip_callback_wrapper, data);
+			 skip_callback_wrapper, task);
     }
 
 }



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