pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/39413?usp=email )
Change subject: stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation improvements
......................................................................
stream: osmo_stream_{cli,srv}_set_segmentation_cb(2): documentation improvements
* Wrap lines to a shorter width
* Improve osmo_stream_cli_set_segmentation_cb() adding text available in
osmo_stream_srv_set_segmentation_cb()
* Refer to segmentation_cb in segmentation_cb2 documentation and only
outline the differences.
Change-Id: I55eb9a7781c22db68446265d2a174ae4f5e9f6ef
---
M src/stream_cli.c
M src/stream_srv.c
2 files changed, 21 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/13/39413/1
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 6628ad7..fa3ac76 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -821,6 +821,11 @@
* \param[in,out] cli Stream Client to modify
* \param[in] segmentation_cb Target segmentation callback
*
+ * A segmentation call-back can optionally be used when a packet based protocol
+ * (like TCP) is used within a STREAM style socket that does not preserve
+ * message boundaries within the stream. If a segmentation call-back is given,
+ * the osmo_stream_srv library code will makes sure that the read_cb called
+ * only for complete single messages, and not arbitrary segments of the stream.
*/
void osmo_stream_cli_set_segmentation_cb(struct osmo_stream_cli *cli,
osmo_stream_cli_segmentation_cb_t segmentation_cb)
@@ -834,6 +839,10 @@
/*! Set the segmentation callback for the client.
* \param[in,out] cli Stream Client to modify
* \param[in] segmentation_cb2 Target segmentation callback
+ *
+ * Same as osmo_stream_cli_set_segmentation_cb(), but a
+ * osmo_stream_cli_segmentation_cb2_t is called instead which allows access to
+ * the related cli object.
*/
void osmo_stream_cli_set_segmentation_cb2(struct osmo_stream_cli *cli,
osmo_stream_cli_segmentation_cb2_t segmentation_cb2)
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 05f780c..366fe64 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -1104,13 +1104,15 @@
* \param[in,out] conn Target Stream Server to modify
* \param[in] segmentation_cb Segmentation callback to be set
*
- * A segmentation call-back can optionally be used when a packet based protocol (like TCP) is used within a
- * STREAM style socket that does not preserve message boundaries within the stream. If a segmentation
- * call-back is given, the osmo_stream_srv library code will makes sure that the read_cb called only for
- * complete single messages, and not arbitrary segments of the stream.
+ * A segmentation call-back can optionally be used when a packet based protocol
+ * (like TCP) is used within a STREAM style socket that does not preserve
+ * message boundaries within the stream. If a segmentation call-back is given,
+ * the osmo_stream_srv library code will makes sure that the read_cb called
+ * only for complete single messages, and not arbitrary segments of the stream.
*
- * This function only works with osmo_stream_srv in osmo_io mode, created by osmo_stream_srv_create2()!
- * The connection has to have been established prior to calling this function.
+ * This function only works with osmo_stream_srv in osmo_io mode, created by
+ * osmo_stream_srv_create2()! The connection has to have been established prior
+ * to calling this function.
*
*/
void osmo_stream_srv_set_segmentation_cb(struct osmo_stream_srv *conn,
@@ -1128,16 +1130,12 @@
* \param[in,out] conn Target Stream Server to modify
* \param[in] segmentation_cb2 Segmentation callback to be set
*
- * A segmentation call-back can optionally be used when a packet based protocol (like TCP) is used within a
- * STREAM style socket that does not preserve message boundaries within the stream. If a segmentation
- * call-back is given, the osmo_stream_srv library code will makes sure that the read_cb called only for
- * complete single messages, and not arbitrary segments of the stream.
- *
- * This function only works with osmo_stream_srv in osmo_io mode, created by osmo_stream_srv_create2()!
- * The connection has to have been established prior to calling this function.
+ * Same as osmo_stream_srv_set_segmentation_cb(), but a
+ * osmo_stream_srv_segmentation_cb2_t is called instead which allows access to
+ * the related conn object.
*/
void osmo_stream_srv_set_segmentation_cb2(struct osmo_stream_srv *conn,
- osmo_stream_srv_segmentation_cb2_t segmentation_cb2)
+ osmo_stream_srv_segmentation_cb2_t segmentation_cb2)
{
/* Note that the following implies that iofd != NULL, since
* osmo_stream_srv_create2() creates the iofd member, too */
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/39413?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I55eb9a7781c22db68446265d2a174ae4f5e9f6ef
Gerrit-Change-Number: 39413
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: daniel, fixeria, laforge, pespin.
osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/39396?usp=email )
Change subject: Pass ownership of Tx xua_msg down the stack [1/2]
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
Patchset:
PS2:
The patch looks good to me. Since these are just internal changes in libosmo-sigtran (from what I can tell no Osmocom program/library is using the modified functions directly outside of libosmo-sigtran, even the non-static ones) and Pau said that all tests pass with this, it should be fine to merge this IMHO if Harald is fine with the architectural change.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/39396?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I49e718e624da08510a9c3d28bdb360c59f9a65d3
Gerrit-Change-Number: 39396
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 24 Jan 2025 11:00:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes