Attention is currently required from: arehbein.

daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/33084 )

Change subject: osmo_io: Fix sending msgb structures
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

This change is ready for review.

Patchset:

PS2:
Re-adding the comments from the private change:

> > daniel:
> > Can you elaborate on that? Right now the expectation is that the user calls 
> > write_enable separately. I guess we could change the behaviour if we never 
> > want to enqueue messages that should not be sent immediately.
> >
> > In that case we should also change the sendmsg function below to behave the 
> > same.

> arehbein:
> A couple of reasons which together strongly suggested to me it should be like 
> this:
>
> * osmo_stream_srv_send()  was broken because the 'write enable' was missing
> * The doc for osmo_iofd_write_msgb()  says /*! Send a message through a 
> connected socket
> * The function name suggests that the write should be caused by it.
>
> Maybe the last two points are also why the write enable was omitted in 
> osmo_stream_srv_send() .
>
> Admittedly, I didn't check the equivalent *_cli_*  function...
> however I'm in favor of renaming the function  ( osmo_iofd_write_msgb  -> 
> osmo_iofd_append_msgb  maybe?) and fixing the doc if we stick with the 
> current approach/the one you are mentioning.

I can see that it's confusing as it is right now. Maybe the issue is that we 
currently require a call to read/write_enable when opening the io_fd.
Instead it should probably be the default. If the user calls read/write_disable 
it's much more obvious that they'll need to call *_enable again.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33084
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ie2a9c93f820fa372a1d527c805fd0fe2cff0eb49
Gerrit-Change-Number: 33084
Gerrit-PatchSet: 2
Gerrit-Owner: arehbein <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-Attention: arehbein <[email protected]>
Gerrit-Comment-Date: Tue, 30 May 2023 13:19:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Reply via email to