jsoninfo: change Route->"interface" key to "networkInterface" to ease scraping using...
authorHans-Christoph Steiner <hans@eds.org>
Fri, 6 Jul 2012 19:32:16 +0000 (15:32 -0400)
committerHans-Christoph Steiner <hans@eds.org>
Fri, 6 Jul 2012 19:32:16 +0000 (15:32 -0400)
- "interface" is a reserved word in Java, so no variable can have that name

lib/jsoninfo/src/olsrd_jsoninfo.c

index c3ba51c..4eb3545 100644 (file)
@@ -630,7 +630,7 @@ ipc_print_routes(struct autobuf *abuf)
       abuf_json_int(abuf, "rtpMetricCost", ROUTE_COST_BROKEN);
     else
       abuf_json_int(abuf, "rtpMetricCost", rt->rt_best->rtp_metric.cost);
-    abuf_json_string(abuf, "interface",
+    abuf_json_string(abuf, "networkInterface",
                      if_ifwithindex_name(rt->rt_best->rtp_nexthop.iif_index));
     abuf_json_close_array_entry(abuf);
   }
@@ -940,6 +940,7 @@ ipc_print_config(struct autobuf *abuf)
   }
   abuf_json_close_array(abuf);
 
+
   abuf_json_int(abuf, "totalIpcConnectionsAllowed", olsr_cnf->ipc_connections);
   abuf_json_open_array(abuf, "ipcAllowedAddresses");
   if (olsr_cnf->ipc_connections) {