aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith <keith@rhizomatica.org>2017-02-25 13:46:37 +0100
committerKeith Whyte <keith@rhizomatica.org>2017-03-01 11:48:09 +0000
commitf01bd13ca1d137c4ec32ba301c47afb69a839378 (patch)
tree5fbbcf9a0e413ef910cc34550d3e4ece1cf3153a
parentf480b3589379be870453826ab7f1abaffb6f6315 (diff)
meas_json: fix NEIGH: missing array braces
Make NEIGH an array of Javascript objects, otherwise the JSON is not parseable when neighbours exist Change-Id: I42029f40bf357adbb2f3c71cdcbafbc21090e348
-rw-r--r--openbsc/src/utils/meas_json.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/utils/meas_json.c b/openbsc/src/utils/meas_json.c
index 93203bc7e..51eb6c74e 100644
--- a/openbsc/src/utils/meas_json.c
+++ b/openbsc/src/utils/meas_json.c
@@ -89,7 +89,7 @@ static void print_meas_rep_json(struct gsm_meas_rep *mr)
for (i = 0; i < mr->num_cell; i++) {
struct gsm_meas_rep_cell *mrc = &mr->cell[i];
if (i!=0) printf(", ");
- printf("\"IDX\":%u, \"ARFCN\":%u, \"BSIC\":%u, \"POWER\":%d",
+ printf("{\"IDX\":%u, \"ARFCN\":%u, \"BSIC\":%u, \"POWER\":%d}",
mrc->neigh_idx, mrc->arfcn, mrc->bsic, rxlev2dbm(mrc->rxlev));
}
printf("]");
@@ -151,6 +151,7 @@ static int handle_msg(struct msgb *msg)
default:
break;
}
+ return 0;
}
static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what)