laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/36293?usp=email )
Change subject: Ensure osmo_stream_{cli,srv}_recv() is used only in osmo_fd mode ......................................................................
Ensure osmo_stream_{cli,srv}_recv() is used only in osmo_fd mode
The osmo_stream_{cli,srv}_recv() is only for osmo_fd mode users; in case osmo_io mode is used, the read_cb is called with pre-filled message buffers; no need to recv/read directly anymore.
Change-Id: Ie96cf1241b2ba4e0a7dda584182d18cad2b4f061 --- M src/stream_cli.c M src/stream_srv.c 2 files changed, 15 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/93/36293/1
diff --git a/src/stream_cli.c b/src/stream_cli.c index 9c3f65a..f19bf98 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -1054,6 +1054,7 @@ int ret; OSMO_ASSERT(cli); OSMO_ASSERT(msg); + OSMO_ASSERT(cli->mode == OSMO_STREAM_MODE_OSMO_FD);
switch (cli->sk_domain) { case AF_UNIX: diff --git a/src/stream_srv.c b/src/stream_srv.c index 58ed7ef..b53caab 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -1073,6 +1073,7 @@ int ret; OSMO_ASSERT(conn); OSMO_ASSERT(msg); + OSMO_ASSERT(conn->mode == OSMO_STREAM_MODE_OSMO_FD);
switch (conn->srv->sk_domain) { case AF_UNIX: