diff options
author | Harald Welte <laforge@gnumonks.org> | 2014-08-21 14:34:32 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-08-21 15:34:18 +0200 |
commit | c78e74e3d022400c66da05015e716ccb7fa18a63 (patch) | |
tree | 4dbc6e975a67d07e1a865fe2bae0e3b8220ff84d /src/ctrl | |
parent | d8db92c578d7fcd81148ef5b977f5d2480a56cde (diff) |
libctrl: remove 'struct gsm_network' references
libctrl doesn't need any knowledge about the type of the user-private
data that it gets passed upon setup time and includes on callbacks.
Diffstat (limited to 'src/ctrl')
-rw-r--r-- | src/ctrl/control_if.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c index 325caff9..5db2eead 100644 --- a/src/ctrl/control_if.c +++ b/src/ctrl/control_if.c @@ -167,7 +167,7 @@ static int handle_control_read(struct osmo_fd * bfd) if (cmd) { cmd->ccon = ccon; - if (ctrl->handler(cmd, ctrl->gsmnet) != CTRL_CMD_HANDLED) { + if (ctrl->handler(cmd, ctrl->data) != CTRL_CMD_HANDLED) { ctrl_cmd_send(queue, cmd); talloc_free(cmd); } @@ -522,19 +522,19 @@ static int verify_counter(struct ctrl_cmd *cmd, const char *value, void *data) return 0; } -struct ctrl_handle *controlif_setup(struct gsm_network *gsmnet, uint16_t port, +struct ctrl_handle *controlif_setup(void *data, uint16_t port, ctrl_cmd_handler handler) { int ret; struct ctrl_handle *ctrl; - ctrl = talloc_zero(gsmnet, struct ctrl_handle); + ctrl = talloc_zero(data, struct ctrl_handle); if (!ctrl) return NULL; INIT_LLIST_HEAD(&ctrl->ccon_list); - ctrl->gsmnet = gsmnet; + ctrl->data = data; ctrl->handler = handler; ctrl_node_vec = vector_init(5); |