From d53d2169442fd43ed1538c3970c6e7cb6096f20a Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sat, 16 Dec 2017 03:57:56 +0100 Subject: ctrl: prep test: separate new ctrl_handle_msg() from handle_control_read() In order to allow unit testing the ctrl iface msgb handling, have a separate msgb entry point function from the actual fd read function. An upcoming patch will prove a memory leak in CTRL msgb handling by a unit test that needs this separation. Change-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3 --- include/osmocom/ctrl/control_if.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h index d4443287..5fa9588d 100644 --- a/include/osmocom/ctrl/control_if.h +++ b/include/osmocom/ctrl/control_if.h @@ -43,3 +43,5 @@ int ctrl_cmd_handle(struct ctrl_handle *ctrl, struct ctrl_cmd *cmd, void *data); struct ctrl_cmd *ctrl_cmd_exec_from_string(struct ctrl_handle *ch, const char *cmdstr); int ctrl_lookup_register(ctrl_cmd_lookup lookup); + +int ctrl_handle_msg(struct ctrl_handle *ctrl, struct ctrl_connection *ccon, struct msgb *msg); -- cgit v1.2.3