[Olsr-dev] [PATCH v1 005/115] txtinfo: '/ver' and '/neighbours' are specials when determining the action
Ferry Huberts
(spam-protected)
Wed Dec 2 21:27:38 CET 2015
From: Ferry Huberts <(spam-protected)>
Signed-off-by: Ferry Huberts <(spam-protected)>
---
lib/txtinfo/src/olsrd_txtinfo.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/lib/txtinfo/src/olsrd_txtinfo.c b/lib/txtinfo/src/olsrd_txtinfo.c
index 8adf457..0ffbf53 100644
--- a/lib/txtinfo/src/olsrd_txtinfo.c
+++ b/lib/txtinfo/src/olsrd_txtinfo.c
@@ -372,12 +372,6 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
send_what |= SIW_OLSRD_CONF;
else if (strstr(requ, "/all"))
send_what = SIW_ALL;
- /* To print out neighbours only on the Freifunk Status
- * page the normal output is somewhat lengthy. The
- * header parsing is sufficient for standard wget.
- */
- else if (strstr(requ, "/neighbours"))
- send_what = SIW_NEIGHBORS | SIW_LINKS;
else {
/* print out every combinations of requested tabled
* 3++ letter abbreviations are matched */
@@ -399,10 +393,19 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
send_what |= SIW_INTERFACES;
if (strstr(requ, "/2ho"))
send_what |= SIW_2HOP;
- if (strstr(requ, "/ver"))
- send_what |= SIW_VERSION;
if (strstr(requ, "/sgw"))
send_what |= SIW_SGW;
+
+ // specials
+ if (strstr(requ, "/ver"))
+ send_what |= SIW_VERSION;
+
+ /* 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;
}
}
--
2.5.0
More information about the Olsr-dev
mailing list