[Olsr-dev] [PATCH v1 04/10] info: requesting / now is equivalent to /all

Ferry Huberts (spam-protected)
Sun Feb 21 18:56:17 CET 2016


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 lib/info/olsrd_info.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/info/olsrd_info.c b/lib/info/olsrd_info.c
index 15b594f..866db8c 100644
--- a/lib/info/olsrd_info.c
+++ b/lib/info/olsrd_info.c
@@ -428,11 +428,17 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
       char * req = requ;
       req[s] = '\0';
       req = parseRequest(req, (size_t*)&s);
-      send_what = determine_action(req);
+      if ((req[0] == '\0') || ((req[0] == '/') && (req[1] == '\0'))) {
+        /* empty or '/' */
+        send_what = SIW_ALL;
+      } else {
+        send_what = determine_action(req);
+      }
     }
 
-    if (!send_what)
+    if (!send_what) {
       send_what = SIW_ALL;
+    }
   }
 
   send_info(send_what, ipc_connection);
-- 
2.5.0




More information about the Olsr-dev mailing list