laforge submitted this change.
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(-)
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:
To view, visit change 36293. To unsubscribe, or for help writing mail filters, visit settings.