aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libctrl
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-25 16:37:45 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2011-08-26 12:30:19 +0200
commitedd65a2575ccc9a95d4fe938ad2561d705f513e8 (patch)
tree6ae6377139b2484bca06d6b9987c553687e93729 /openbsc/src/libctrl
parent774c62614aa1c033416b74b0ad7ec897bc58256d (diff)
libctrl, osmo-bsc: Get rid of net prefix
net is now implicit in the root node
Diffstat (limited to 'openbsc/src/libctrl')
-rw-r--r--openbsc/src/libctrl/control_if.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/openbsc/src/libctrl/control_if.c b/openbsc/src/libctrl/control_if.c
index 40ca21221..630b7e77b 100644
--- a/openbsc/src/libctrl/control_if.c
+++ b/openbsc/src/libctrl/control_if.c
@@ -137,9 +137,8 @@ int ctrl_cmd_handle(struct ctrl_cmd *cmd, void *data)
char *token, *request;
long num;
int i, j, ret, node;
- struct gsm_network *gsmnet = data;
- struct gsm_network *net = NULL;
+ struct gsm_network *net = data;
struct gsm_bts *bts = NULL;
struct gsm_bts_trx *trx = NULL;
struct gsm_bts_trx_ts *ts = NULL;
@@ -147,8 +146,8 @@ int ctrl_cmd_handle(struct ctrl_cmd *cmd, void *data)
ret = CTRL_CMD_ERROR;
cmd->reply = "Someone forgot to fill in the reply.";
- cmd->node = NULL;
node = CTRL_NODE_ROOT;
+ cmd->node = net;
request = talloc_strdup(tall_bsc_ctx, cmd->variable);
if (!request)
@@ -171,13 +170,7 @@ int ctrl_cmd_handle(struct ctrl_cmd *cmd, void *data)
/* TODO: We need to make sure that the following chars are digits
* and/or use strtol to check if number conversion was successful
* Right now something like net.bts_stats will not work */
- if (!strcmp(token, "net")) {
- net = gsmnet;
- if (!net)
- goto err_missing;
- cmd->node = net;
- node = CTRL_NODE_NET;
- } else if (!strcmp(token, "bts")) {
+ if (!strcmp(token, "bts")) {
if (!net)
goto err_missing;
i++;