diff options
author | Harald Welte <laforge@osmocom.org> | 2023-11-20 12:18:14 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2023-11-20 12:25:43 +0100 |
commit | 1a5f879ae2a80f0057eb9f18723f61629b5ed257 (patch) | |
tree | b14032d426c980a5c40493197a2722b15a09edbe | |
parent | 86016256662d47efb8899d494a153592fc6e4c6a (diff) |
stream_srv: osmo_stream_srv_get_ofd() works only in OSMO_FD mode
The corresponding client function osmo_stream_cli_get_ofd()
already contained an OSMO_ASSERT, but the server side was missing
this so far. The 'ofd' member only has meaning in the context
of OSMO_FD, so calling that function from generic code is wrong!
Change-Id: I50df259040e011135a31fe1aee231eba430fa94a
Fixes: Change-Id I2f52c7107c392b6f4b0bf2a84f8c873c084a200c
Related: OS#5753
-rw-r--r-- | src/stream_srv.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stream_srv.c b/src/stream_srv.c index 1370e42..36e21cc 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -834,6 +834,7 @@ void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn) struct osmo_fd * osmo_stream_srv_get_ofd(struct osmo_stream_srv *conn) { + OSMO_ASSERT(conn->mode == OSMO_STREAM_MODE_OSMO_FD); return &conn->ofd; } |