laforge has submitted this change. (
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(-)
Approvals:
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
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
https://gerrit.osmocom.org/c/libosmo-netif/+/36293?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ie96cf1241b2ba4e0a7dda584182d18cad2b4f061
Gerrit-Change-Number: 36293
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged