Attention is currently required from: pespin.
2 comments:
File include/osmocom/core/osmo_io.h:
Patch Set #3, Line 46: * Needs to return the size of the next segment. If it returns
I'm not sure what "the size of the next segment" means here.
Maybe message? Think of IPA messages over a stream protocol such as TCP. We need to find the message boundaries again and the segmentation_cb returns the size of the next message (as soon as it has enough data to determine that).
File src/core/osmo_io.c:
Patch Set #3, Line 249: } else if (pending_len < 0) {
I think this should be pending_len > 0?
No, pending_len is the difference between what was read so far and the necessary size of the next packet.
len (what segmentation_cb() returns) is the expected size of the next packet, msg_len is the size of what was read so far.
So for IPA and you read 3 bytes:
| 0x00 | 0x03 | 0x00 |
In that case segmentation_cb will return 6 (len in the message is 3 + size of ipa_head).
pending_len = -3 (3 bytes are missing), therefore we need to save the complete msg and defer handling anything.
To view, visit change 32758. To unsubscribe, or for help writing mail filters, visit settings.