[packages] olsrd: bring txtinfo/gateways formatting in line with the other output modes

git-svn-id: svn://svn.openwrt.org/openwrt/packages@24265 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2010-12-05 18:41:16 +00:00
parent 16e4653d91
commit 1dfd9187a8
3 changed files with 24 additions and 4 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=olsrd
PKG_VERSION:=0.6.1
PKG_RELEASE:=1
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6

View File

@ -1,6 +1,6 @@
--- a/src/linux/net.c
+++ b/src/linux/net.c
@@ -171,11 +171,13 @@ static bool is_at_least_linuxkernel_2_6_
@@ -174,11 +174,13 @@ static bool is_at_least_linuxkernel_2_6_
*/
void
net_os_set_global_ifoptions(void) {
@ -14,7 +14,7 @@
if (olsr_cnf->smart_gw_active) {
char procfile[FILENAME_MAX];
@@ -266,10 +268,12 @@ net_os_restore_ifoptions(void)
@@ -273,10 +275,12 @@ net_os_restore_ifoptions(void)
OLSR_PRINTF(1, "Restoring network state\n");
@ -25,5 +25,5 @@
}
+#endif
if (olsr_cnf->smart_gw_active) {
if (olsr_cnf->smart_gw_active && (olsr_cnf->ip_version == AF_INET || olsr_cnf->use_niit)) {
/* Generate the procfile name */

View File

@ -0,0 +1,20 @@
--- a/lib/txtinfo/src/olsrd_txtinfo.c
+++ b/lib/txtinfo/src/olsrd_txtinfo.c
@@ -562,7 +562,7 @@ ipc_print_gateway(struct autobuf *abuf)
struct lqtextbuffer lqbuf;
// Status IP ETX Hopcount Uplink-Speed Downlink-Speed ipv4/ipv4-nat/- ipv6/- ipv6-prefix/-
- abuf_puts(abuf, "Table: Gateways\n Gateway\tETX\tHopcnt\tUplink\tDownlnk\tIPv4\tIPv6\tPrefix\n");
+ abuf_puts(abuf, "Table: Gateways\nGateway\tETX\tHopcnt\tUplink\tDownlnk\tIPv4\tIPv6\tPrefix\n");
OLSR_FOR_ALL_GATEWAY_ENTRIES(gw) {
char v4 = '-', v6 = '-';
bool autoV4 = false, autoV6 = false;
@@ -595,7 +595,7 @@ ipc_print_gateway(struct autobuf *abuf)
v6type = IPV6;
}
- abuf_appendf(abuf, "%c%c %s\t%s\t%d\t%u\t%u\t%s\t%s\t%s\n",
+ abuf_appendf(abuf, "%c%c\t%s\t%s\t%d\t%u\t%u\t%s\t%s\t%s\n",
v4, v6, olsr_ip_to_string(&buf, &gw->originator),
get_linkcost_text(tc->path_cost, true, &lqbuf), tc->hops,
gw->uplink, gw->downlink, v4type, v6type,