[evolution-data-server/wip/mcrha/soup3] e_soup_session_util_get_message_request_body: Make the out_length optional
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/mcrha/soup3] e_soup_session_util_get_message_request_body: Make the out_length optional
- Date: Wed, 8 Dec 2021 17:29:05 +0000 (UTC)
commit d39a6f6b2348727ef7e3349b4a9944fac5d9373c
Author: Milan Crha <mcrha redhat com>
Date: Wed Dec 8 18:28:33 2021 +0100
e_soup_session_util_get_message_request_body: Make the out_length optional
src/libedataserver/e-soup-session.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/libedataserver/e-soup-session.c b/src/libedataserver/e-soup-session.c
index bf277d8da..1d2b84db7 100644
--- a/src/libedataserver/e-soup-session.c
+++ b/src/libedataserver/e-soup-session.c
@@ -1416,7 +1416,7 @@ e_soup_session_util_set_message_request_body_from_data (SoupMessage *message,
/**
* e_soup_session_util_get_message_request_body:
* @message: a #SoupMessage
- * @out_length: (out): length of the input stream
+ * @out_length: (out) (optional): length of the input stream
*
* Returns referenced request data for the @message, as being previously
* set by the e_soup_session_util_set_message_request_body() or
@@ -1439,7 +1439,6 @@ e_soup_session_util_get_message_request_body (SoupMessage *message,
MessageData *md;
g_return_val_if_fail (SOUP_IS_MESSAGE (message), NULL);
- g_return_val_if_fail (out_length != NULL, NULL);
md = g_object_get_data (G_OBJECT (message), MESSAGE_DATA_KEY);
@@ -1449,7 +1448,8 @@ e_soup_session_util_get_message_request_body (SoupMessage *message,
if (G_IS_SEEKABLE (md->input_stream) && md->read_from != g_seekable_tell (G_SEEKABLE
(md->input_stream)))
g_seekable_seek (G_SEEKABLE (md->input_stream), md->read_from, G_SEEK_SET, NULL, NULL);
- *out_length = md->length;
+ if (out_length)
+ *out_length = md->length;
return md->input_stream;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]