aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2012-05-14 18:43:23 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2012-05-23 17:33:56 +0200
commit5ea63b2098cac20617f8f052706a63ccb8558282 (patch)
treea15a40381da07a0cdc9cb6d1e9ae88d71992ebcf /openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
parent7b03e41e55ab9354b1ccd6acdd96fb7fc648b037 (diff)
osmo-bsc: Add VTY command show position
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_ctrl.c')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_ctrl.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
index cae7c5704..4555f377d 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -212,13 +212,6 @@ static void generate_location_state_trap(struct gsm_bts *bts, struct bsc_msc_con
talloc_free(cmd);
}
-static const struct value_string valid_names[] = {
- { BTS_LOC_FIX_INVALID, "invalid" },
- { BTS_LOC_FIX_2D, "fix2d" },
- { BTS_LOC_FIX_3D, "fix3d" },
- { 0, NULL }
-};
-
static int location_equal(struct bts_location *a, struct bts_location *b)
{
return ((a->tstamp == b->tstamp) && (a->valid == b->valid) && (a->lat == b->lat) &&
@@ -272,7 +265,7 @@ static int get_bts_loc(struct ctrl_cmd *cmd, void *data)
}
cmd->reply = talloc_asprintf(cmd, "%lu,%s,%f,%f,%f", curloc->tstamp,
- get_value_string(valid_names, curloc->valid), curloc->lat, curloc->lon, curloc->height);
+ get_value_string(bts_loc_fix_names, curloc->valid), curloc->lat, curloc->lon, curloc->height);
if (!cmd->reply) {
cmd->reply = "OOM";
return CTRL_CMD_ERROR;
@@ -314,7 +307,7 @@ static int set_bts_loc(struct ctrl_cmd *cmd, void *data)
height = strtok_r(NULL, "\0", &saveptr);
curloc->tstamp = atol(tstamp);
- curloc->valid = get_string_value(valid_names, valid);
+ curloc->valid = get_string_value(bts_loc_fix_names, valid);
curloc->lat = atof(lat);
curloc->lon = atof(lon);
curloc->height = atof(height);
@@ -363,7 +356,7 @@ static int verify_bts_loc(struct ctrl_cmd *cmd, const char *value, void *data)
goto err;
tstamp = atol(tstampstr);
- valid = get_string_value(valid_names, validstr);
+ valid = get_string_value(bts_loc_fix_names, validstr);
lat = atof(latstr);
lon = atof(lonstr);
height = atof(heightstr);