diff options
author | Patrick Griffis <pgriffis@igalia.com> | 2021-03-05 12:19:07 -0600 |
---|---|---|
committer | Patrick Griffis <pgriffis@igalia.com> | 2021-03-05 12:19:07 -0600 |
commit | d1ba9fcdadcd3a2e45a9cdc5aca9b6861601a6f4 (patch) | |
tree | 63ee777f6a4c2491ed6de31e6c66597235108b28 | |
parent | e81847ca8aa4c6e8d7d9208e0146db12542141f4 (diff) | |
download | libsoup-d1ba9fcdadcd3a2e45a9cdc5aca9b6861601a6f4.tar.gz |
Use g_memory_output_stream_new_resizable()
-rw-r--r-- | libsoup/soup-session.c | 8 | ||||
-rw-r--r-- | tests/server-test.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c index 6686afff..32178bd4 100644 --- a/libsoup/soup-session.c +++ b/libsoup/soup-session.c @@ -2964,7 +2964,7 @@ send_async_maybe_complete (SoupMessageQueueItem *item, GOutputStream *ostream; /* Gather the current message body... */ - ostream = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); + ostream = g_memory_output_stream_new_resizable (); g_object_set_data_full (G_OBJECT (item->task), "SoupSession:ostream", ostream, g_object_unref); @@ -3365,7 +3365,7 @@ soup_session_send (SoupSession *session, break; /* Gather the current message body... */ - ostream = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); + ostream = g_memory_output_stream_new_resizable (); if (g_output_stream_splice (ostream, stream, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, @@ -3452,7 +3452,7 @@ send_and_read_stream_ready_cb (SoupSession *session, return; } - ostream = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); + ostream = g_memory_output_stream_new_resizable (); g_output_stream_splice_async (ostream, stream, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | @@ -3559,7 +3559,7 @@ soup_session_send_and_read (SoupSession *session, if (!stream) return NULL; - ostream = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); + ostream = g_memory_output_stream_new_resizable (); if (g_output_stream_splice (ostream, stream, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | diff --git a/tests/server-test.c b/tests/server-test.c index f0bc8ef0..61ada919 100644 --- a/tests/server-test.c +++ b/tests/server-test.c @@ -728,7 +728,7 @@ do_iostream_accept_test (void) soup_server_add_handler (server, NULL, mem_server_callback, NULL, NULL); input = g_memory_input_stream_new_from_data (req, sizeof(req), NULL); - output = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); + output = g_memory_output_stream_new_resizable (); stream = g_test_io_stream_new (input, output); addr = g_inet_socket_address_new_from_string ("127.0.0.1", 0); |