pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/30877 ) Change subject: ctrl: assert if program forgot to initialize the ctr handler before installing cmds ...................................................................... ctrl: assert if program forgot to initialize the ctr handler before installing cmds Change-Id: Icf3873f33470499fed3150ff51922a36aa0f023e --- M src/ctrl/control_cmd.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/77/30877/1 diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c index b069ca4..d51ad69 100644 --- a/src/ctrl/control_cmd.c +++ b/src/ctrl/control_cmd.c @@ -210,6 +210,11 @@ { vector cmds_vec; + /* If this assert triggers, it means the program forgot to initialize + * the CTRL interface first by calling ctrl_handle_alloc(2)() directly + * or indirectly through ctrl_interface_setup_dynip(2)() */ + OSMO_ASSERT(ctrl_node_vec); + cmds_vec = vector_lookup_ensure(ctrl_node_vec, node); if (!cmds_vec) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30877 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icf3873f33470499fed3150ff51922a36aa0f023e Gerrit-Change-Number: 30877 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange