aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libctrl
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-08-22 23:44:32 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-08-22 23:45:57 +0200
commit05ac9e365cae1fe12ced9510641c9c389b1572de (patch)
tree93a8c5b4ae2077b1dbf295372f50679053c371a3 /openbsc/src/libctrl
parent9cc771bd3dcf7b9102486ca613da3e5c1fa78a16 (diff)
libctrl: Add a function to create the cmd
Diffstat (limited to 'openbsc/src/libctrl')
-rw-r--r--openbsc/src/libctrl/control_cmd.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/openbsc/src/libctrl/control_cmd.c b/openbsc/src/libctrl/control_cmd.c
index 7a75e0e22..3c4efc06d 100644
--- a/openbsc/src/libctrl/control_cmd.c
+++ b/openbsc/src/libctrl/control_cmd.c
@@ -239,6 +239,18 @@ int ctrl_cmd_install(enum ctrl_node_type node, struct ctrl_cmd_element *cmd)
return 0;
}
+struct ctrl_cmd *ctrl_cmd_create(void *ctx, enum ctrl_type type)
+{
+ struct ctrl_cmd *cmd;
+
+ cmd = talloc_zero(ctx, struct ctrl_cmd);
+ if (!cmd)
+ return NULL;
+
+ cmd->type = type;
+ return cmd;
+}
+
struct ctrl_cmd *ctrl_cmd_cpy(void *ctx, struct ctrl_cmd *cmd)
{
struct ctrl_cmd *cmd2;