aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2011-08-25 16:37:45 +0200
committerHarald Welte <laforge@gnumonks.org>2014-08-21 15:34:15 +0200
commit9c97493c5c90d7c81a11cf28965fd513f665d1cd (patch)
tree40f61af4bb91450ea7d7f00e8b978208abc76ca1
parent3463941c724966c30a827c39b70360fa4bbe0bd9 (diff)
libctrl, osmo-bsc: Get rid of net prefix
net is now implicit in the root node
-rw-r--r--openbsc/include/openbsc/control_cmd.h1
-rw-r--r--openbsc/src/libctrl/control_if.c13
2 files changed, 3 insertions, 11 deletions
diff --git a/openbsc/include/openbsc/control_cmd.h b/openbsc/include/openbsc/control_cmd.h
index da598c51..3dc5b546 100644
--- a/openbsc/include/openbsc/control_cmd.h
+++ b/openbsc/include/openbsc/control_cmd.h
@@ -14,7 +14,6 @@ struct ctrl_handle;
enum ctrl_node_type {
CTRL_NODE_ROOT, /* Root elements */
- CTRL_NODE_NET, /* Network specific (net.) */
CTRL_NODE_BTS, /* BTS specific (net.btsN.) */
CTRL_NODE_TRX, /* TRX specific (net.btsN.trxM.) */
CTRL_NODE_TS, /* TS specific (net.btsN.trxM.tsI.) */
diff --git a/openbsc/src/libctrl/control_if.c b/openbsc/src/libctrl/control_if.c
index e76b4e5f..beb5b432 100644
--- a/openbsc/src/libctrl/control_if.c
+++ b/openbsc/src/libctrl/control_if.c
@@ -139,9 +139,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;
@@ -149,8 +148,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)
@@ -173,13 +172,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++;