[Olsr-dev] [PATCH v1 23/44] txtinfo: the configuration is a special case

Ferry Huberts (spam-protected)
Fri Nov 27 10:43:16 CET 2015


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 lib/txtinfo/src/olsrd_txtinfo.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/txtinfo/src/olsrd_txtinfo.c b/lib/txtinfo/src/olsrd_txtinfo.c
index d72a15b..ccd0f6b 100644
--- a/lib/txtinfo/src/olsrd_txtinfo.c
+++ b/lib/txtinfo/src/olsrd_txtinfo.c
@@ -142,12 +142,14 @@ static void ipc_print_sgw(struct autobuf *);
 
 /* these only change at olsrd startup */
 #define SIW_VERSION 0x0400
-#define SIW_CONFIG 0x0800
-#define SIW_STARTUP_ALL (SIW_VERSION | SIW_CONFIG)
+#define SIW_STARTUP_ALL (SIW_VERSION)
 
 /* this is everything in normal format */
 #define SIW_ALL (SIW_RUNTIME_ALL | SIW_STARTUP_ALL)
 
+/* this data is not normal format but olsrd.conf format */
+#define SIW_OLSRD_CONF 0x2000
+
 #define MAX_CLIENTS 3
 
 static char *outbuffer[MAX_CLIENTS];
@@ -357,7 +359,7 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
         if (strstr(requ, "/gat"))
           send_what |= SIW_GATEWAYS;
         if (strstr(requ, "/con"))
-          send_what |= SIW_CONFIG;
+          send_what |= SIW_OLSRD_CONF;
         if (strstr(requ, "/int"))
           send_what |= SIW_INTERFACES;
         if (strstr(requ, "/2ho"))
@@ -850,7 +852,7 @@ static void send_info(unsigned int send_what, int the_socket) {
   if (send_what & SIW_VERSION)
     ipc_print_version(&abuf);
 
-  if (send_what & SIW_CONFIG)
+  if (send_what & SIW_OLSRD_CONF)
     ipc_print_olsrd_conf(&abuf);
 
   assert(outbuffer_count < MAX_CLIENTS);
-- 
2.5.0




More information about the Olsr-dev mailing list