[PATCH] openbsc[master]: meas_json: fix NEIGH: missing array braces

Keith Whyte gerrit-no-reply at lists.osmocom.org
Mon Feb 27 12:17:54 UTC 2017

Hello Neels Hofmeyr, Jenkins Builder,

I'd like you to reexamine a change.  Please visit


to look at the new patch set (#3).

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
M openbsc/src/utils/meas_json.c
1 file changed, 2 insertions(+), 1 deletion(-)

  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/16/1916/3

diff --git a/openbsc/src/utils/meas_json.c b/openbsc/src/utils/meas_json.c
index 93203bc..51eb6c7 100644
--- a/openbsc/src/utils/meas_json.c
+++ b/openbsc/src/utils/meas_json.c
@@ -89,7 +89,7 @@
 	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));
@@ -151,6 +151,7 @@
+	return 0;
 static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what)

To view, visit https://gerrit.osmocom.org/1916
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I42029f40bf357adbb2f3c71cdcbafbc21090e348
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>

More information about the gerrit-log mailing list