[libsoup] Fix soup_session_get_async_result_message() with soup_session_send_and_read_async()
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] Fix soup_session_get_async_result_message() with soup_session_send_and_read_async()
- Date: Fri, 12 Mar 2021 20:04:03 +0000 (UTC)
commit bc0acf4c66da7288eaf2b5e54375021a051d236e
Author: Patrick Griffis <pgriffis igalia com>
Date: Fri Mar 12 12:48:09 2021 -0600
Fix soup_session_get_async_result_message() with soup_session_send_and_read_async()
libsoup/soup-session.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c
index 32178bd4..5f312020 100644
--- a/libsoup/soup-session.c
+++ b/libsoup/soup-session.c
@@ -3445,6 +3445,11 @@ send_and_read_stream_ready_cb (SoupSession *session,
GOutputStream *ostream;
GError *error = NULL;
+ // In order for soup_session_get_async_result_message() to work it must
+ // have the task data for the task it wrapped
+ SoupMessageQueueItem *item = g_task_get_task_data (G_TASK (result));
+ g_task_set_task_data (task, soup_message_queue_item_ref (item),
(GDestroyNotify)soup_message_queue_item_unref);
+
stream = soup_session_send_finish (session, result, &error);
if (!stream) {
g_task_return_error (task, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]