Change in libosmo-netif[master]: detect freed connections in osmo_stream_srv_read()

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Nov 9 14:16:19 UTC 2018


Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/11705 )

Change subject: detect freed connections in osmo_stream_srv_read()
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/11705/1/src/stream.c
File src/stream.c:

https://gerrit.osmocom.org/#/c/11705/1/src/stream.c@855
PS1, Line 855: 		if (rc < 0)
In all places I know of, we use -EBADF as an indicator that the osmo_fd struct was freed and should not keep being used, since usually having any error parsing some message doesn't mean you want to stop from writing on the socket.

See for instance:
libosmo-abis/src/input/ipaccess.c:401
libosmo-abis/src/input/ipa.c:138
libosmo-abis/src/input/ipa.c:384
libosmocore/src/write_queue.c

And grep for "-EBADF" in general.



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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0a9c7d8e3263c73440f7084dbb1792a4ca5038f0
Gerrit-Change-Number: 11705
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Nov 2018 14:16:19 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181109/29816e64/attachment.html>


More information about the gerrit-log mailing list