From 5103ede4d457c2f59aed2adfc9f2598fda1cc051 Mon Sep 17 00:00:00 2001 From: Ferry Huberts Date: Mon, 30 Nov 2015 22:41:23 +0100 Subject: [PATCH] txtinfo: '/ver' and '/neighbours' are specials when determining the action Signed-off-by: Ferry Huberts --- 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 8adf457d..0ffbf53d 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.20.1