packages/olsrd: use new service functions
[lede-routing/.git] / patches / 200-txtinfo_gateways_formatting.patch
1 --- a/lib/txtinfo/src/olsrd_txtinfo.c
2 +++ b/lib/txtinfo/src/olsrd_txtinfo.c
3 @@ -562,7 +562,7 @@ ipc_print_gateway(struct autobuf *abuf)
4    struct lqtextbuffer lqbuf;
5  
6    // Status IP ETX Hopcount Uplink-Speed Downlink-Speed ipv4/ipv4-nat/- ipv6/- ipv6-prefix/-
7 -  abuf_puts(abuf, "Table: Gateways\n   Gateway\tETX\tHopcnt\tUplink\tDownlnk\tIPv4\tIPv6\tPrefix\n");
8 +  abuf_puts(abuf, "Table: Gateways\nGateway\tETX\tHopcnt\tUplink\tDownlnk\tIPv4\tIPv6\tPrefix\n");
9    OLSR_FOR_ALL_GATEWAY_ENTRIES(gw) {
10      char v4 = '-', v6 = '-';
11      bool autoV4 = false, autoV6 = false;
12 @@ -595,7 +595,7 @@ ipc_print_gateway(struct autobuf *abuf)
13        v6type = IPV6;
14      }
15  
16 -    abuf_appendf(abuf, "%c%c %s\t%s\t%d\t%u\t%u\t%s\t%s\t%s\n",
17 +    abuf_appendf(abuf, "%c%c\t%s\t%s\t%d\t%u\t%u\t%s\t%s\t%s\n",
18          v4, v6, olsr_ip_to_string(&buf, &gw->originator),
19          get_linkcost_text(tc->path_cost, true, &lqbuf), tc->hops,
20          gw->uplink, gw->downlink, v4type, v6type,