Attention is currently required from: daniel.
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/32758 )
Change subject: osmo_io: Improve handling of segmentation_cb
......................................................................
Patch Set 3:
(2 comments)
File include/osmocom/core/osmo_io.h:
https://gerrit.osmocom.org/c/libosmocore/+/32758/comment/31c8f07c_c7fabbc6
PS3, Line 46: * Needs to return the size of the next segment. If it returns
Maybe message? Think of IPA messages over a stream
protocol such as TCP. […]
Maybe the initial point here is that I'm not sure why
the segmentation callback is needed in osmo_io, to me that's one layer up and should
be handled by the user of this API. I'm happy to be enlightened on the matter though.
Maybe the problem is that there's no good documentation in here on what's the
purpose of this callback and how it is supposed to be working/implemented.
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/32758/comment/b210fed4_c9ecf3b4
PS3, Line 249: } else if (pending_len < 0) {
No, pending_len is the difference between what was
read so far and the necessary size of the next pa […]
ok, maybe the ting here is
that you should declare:
"pending_len = len - msg_len;"
and then check for "pending_len > 0". It feels really weird having a negative
value in there.
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/32758
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6a0eebb8d4490f09a3cc6eb97d4ff47b4a8fd377
Gerrit-Change-Number: 32758
Gerrit-PatchSet: 3
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 18 May 2023 08:04:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment