[XS] Change in libosmo-netif[master]: stream_cli: fix this API for AF_UNIX sockets
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/44065?usp=email ) Change subject: stream_cli: fix this API for AF_UNIX sockets ...................................................................... stream_cli: fix this API for AF_UNIX sockets Osmocom Stream Client and Server functional layers provided by this library are primarily used for TCP and SCTP over IP, but they also support AF_UNIX local sockets. stream_srv does work for AF_UNIX and has been used successfully in that application, but stream_cli exhibits a bug: it passes both SOCK_F_CONNECT and SOCK_F_BIND to osmo_sock_unix_init(), but having both of these flags set is invalid for the latter API. The correct course is to pass only SOCK_F_CONNECT when initializing an AF_UNIX socket in the client role - fix it. Change-Id: I80e1c697377946ee93cb2939ab7e8914deb824f9 --- M src/stream_cli.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/65/44065/1 diff --git a/src/stream_cli.c b/src/stream_cli.c index a8b5fa6..0f911b7 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -1260,7 +1260,7 @@ switch (cli->sk_domain) { case AF_UNIX: - ret = osmo_sock_unix_init(cli->sk_type, 0, cli->addr[0], OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_BIND|OSMO_SOCK_F_NONBLOCK); + ret = osmo_sock_unix_init(cli->sk_type, 0, cli->addr[0], OSMO_SOCK_F_CONNECT|OSMO_SOCK_F_NONBLOCK); break; case AF_INET: case AF_INET6: -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/44065?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I80e1c697377946ee93cb2939ab7e8914deb824f9 Gerrit-Change-Number: 44065 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon@freecalypso.org>
participants (1)
-
falconia