laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35077?usp=email )
Change subject: osmo_io: Assert that iofd mode is correct when calling *_write_msgb ...................................................................... osmo_io: Assert that iofd mode is correct when calling *_write_msgb Change-Id: Ief82ba7f9b280f85d66d68c358c36ba9866fe47a Fixes: OS#6264 --- M src/core/osmo_io.c 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved 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; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35077?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ief82ba7f9b280f85d66d68c358c36ba9866fe47a Gerrit-Change-Number: 35077 Gerrit-PatchSet: 3 Gerrit-Owner: daniel <dwillm...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-MessageType: merged