[M] Change in libosmocore[master]: osmo_io: Improve handling and documentation of segmentation_cb
Attention is currently required from: laforge, daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32758 ) Change subject: osmo_io: Improve handling and documentation of segmentation_cb ...................................................................... Patch Set 4: (2 comments) File src/core/osmo_io.c: https://gerrit.osmocom.org/c/libosmocore/+/32758/comment/87a153a7_ec2362d1 PS3, Line 249: } else if (pending_len < 0) {
Then I'd have to use -pending_len down in the memcpy which I like much less. […] Ok I see the root of the confusion now I think, "pending_len" as positive is not really the pending_len, but rather "extra_len" to be stored in the next message.
So probably changing the name of the variable to "extra_len" or alike should make all this code much understandable imho. What do you think? File src/core/osmo_io.c: https://gerrit.osmocom.org/c/libosmocore/+/32758/comment/3b32912e_94a6b8e6 PS4, Line 256: memcpy(msgb_data(msg_pending), msgb_data(msg) + len, pending_len); see, "pending_len" is not really the "pending length to be filled for next message" here. -- 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: 4 Gerrit-Owner: daniel <dwillmann@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Attention: daniel <dwillmann@sysmocom.de> Gerrit-Comment-Date: Fri, 19 May 2023 09:47:19 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de> Comment-In-Reply-To: daniel <dwillmann@sysmocom.de> Gerrit-MessageType: comment
participants (1)
-
pespin