Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29540 )
Change subject: stream: Set proper msgb length when returning sctp_notification ......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1: IMHO we should directly set the msgb length in all cases where sctp_recvmsg() returned a length.
Seems this is done in osmo_stream_srv_recv(), just not in cases where error is returned. Doing the put() that late leaves the msgb in incomplete state, hoping that the returned value ends up being put() in the msgb later, which i believe is the root reason for the problem that this patch fixes
Also weird now is that an error is returned, but the msgb has actually received data in it. This is highly unusual behavior of a function and must be api-documented IMO.
File src/stream.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/29540/comment/1947a7b5_18343cff PS1, Line 1563: msgb_put(msg, ret); i'd move this step to directly after sctp_recvmsg()