jsoninfo: print the 2-hops neighbors as a simple list of IP addresses
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 17 Mar 2016 17:33:35 +0000 (18:33 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 17 Mar 2016 17:40:29 +0000 (18:40 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/jsoninfo/src/olsrd_jsoninfo.c

index 92add87..59e12e5 100644 (file)
@@ -428,9 +428,7 @@ static void ipc_print_neighbors_internal(struct autobuf *abuf, bool list_2hop) {
     thop_cnt = 0;
     for (list_2 = neigh->neighbor_2_list.next; list_2 != &neigh->neighbor_2_list; list_2 = list_2->next) {
       if (list_2hop && list_2->neighbor_2) {
-        abuf_json_mark_array_entry(true, abuf);
-        abuf_json_ip_address(abuf, "ipAddress", list_2->neighbor_2 ? &list_2->neighbor_2->neighbor_2_addr : NULL);
-        abuf_json_mark_array_entry(false, abuf);
+        abuf_json_ip_address(abuf, NULL, list_2->neighbor_2 ? &list_2->neighbor_2->neighbor_2_addr : NULL);
       }
       thop_cnt++;
     }