mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-03 13:33:29 +00:00
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
This commit is contained in:
@@ -89,7 +89,7 @@ static void print_meas_rep_json(struct gsm_meas_rep *mr)
|
|||||||
for (i = 0; i < mr->num_cell; i++) {
|
for (i = 0; i < mr->num_cell; i++) {
|
||||||
struct gsm_meas_rep_cell *mrc = &mr->cell[i];
|
struct gsm_meas_rep_cell *mrc = &mr->cell[i];
|
||||||
if (i!=0) printf(", ");
|
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));
|
mrc->neigh_idx, mrc->arfcn, mrc->bsic, rxlev2dbm(mrc->rxlev));
|
||||||
}
|
}
|
||||||
printf("]");
|
printf("]");
|
||||||
@@ -151,6 +151,7 @@ static int handle_msg(struct msgb *msg)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what)
|
static int udp_fd_cb(struct osmo_fd *ofd, unsigned int what)
|
||||||
|
|||||||
Reference in New Issue
Block a user