[Olsr-dev] [PATCH v1 014/115] jsoninfo: add Freifunk neighbours special case, like txtinfo
Ferry Huberts
(spam-protected)
Wed Dec 2 21:27:47 CET 2015
From: Ferry Huberts <(spam-protected)>
Signed-off-by: Ferry Huberts <(spam-protected)>
---
lib/jsoninfo/src/olsrd_jsoninfo.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/jsoninfo/src/olsrd_jsoninfo.c b/lib/jsoninfo/src/olsrd_jsoninfo.c
index d4b3878..f932ddc 100644
--- a/lib/jsoninfo/src/olsrd_jsoninfo.c
+++ b/lib/jsoninfo/src/olsrd_jsoninfo.c
@@ -423,8 +423,16 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
send_what |= SIW_CONFIG;
if (strstr(requ, "/plugins"))
send_what |= SIW_PLUGINS;
+
+ /* To print out neighbours only on the Freifunk Status
+ * page the normal output is somewhat lengthy. The
+ * header parsing is sufficient for standard wget.
+ */
+ if (strstr(requ, "/neighbours"))
+ send_what = SIW_NEIGHBORS | SIW_LINKS;
}
}
+
if (!send_what)
send_what = SIW_ALL;
}
--
2.5.0
More information about the Olsr-dev
mailing list