commit | afdfc6a034d0bec95993f29cc712b66288a54cbc | [log] [tgz] |
---|---|---|
author | Daniel Willmann <dwillmann@sysmocom.de> | Tue Nov 21 10:10:37 2023 +0100 |
committer | laforge <laforge@osmocom.org> | Tue Nov 21 21:02:13 2023 +0000 |
tree | 5be734c22eafaf3c045022c679dcc078a5e4726a | |
parent | 459cb06912c4d7954f0f54b793bf6d232a3c43e8 [diff] [blame] |
osmo_io: Assert that iofd mode is correct when calling *_write_msgb Change-Id: Ief82ba7f9b280f85d66d68c358c36ba9866fe47a Fixes: OS#6264
diff --git a/src/core/osmo_io.c b/src/core/osmo_io.c index 2b2b7dd..f23986f 100644 --- a/src/core/osmo_io.c +++ b/src/core/osmo_io.c
@@ -356,6 +356,7 @@ { int rc; + OSMO_ASSERT(iofd->mode == OSMO_IO_FD_MODE_READ_WRITE); if (OSMO_UNLIKELY(!iofd->io_ops.write_cb)) { LOGPIO(iofd, LOGL_ERROR, "write_cb not set, Rejecting msgb\n"); return -EINVAL;