txtinfo: re-order the sent information
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 26 Nov 2015 14:04:15 +0000 (15:04 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 27 Nov 2015 09:17:21 +0000 (10:17 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/txtinfo/src/olsrd_txtinfo.c

index f2212f7..202d013 100644 (file)
@@ -818,43 +818,33 @@ static void send_info(unsigned int send_what, int the_socket) {
 
   /* Print tables to IPC socket */
 
-  /* links */
-  if (send_what & SIW_LINKS)
-    ipc_print_links(&abuf);
-  /* neighbours */
   if (send_what & SIW_NEIGHBORS)
     ipc_print_neighbors(&abuf, false);
-  /* topology */
-  if (send_what & SIW_TOPOLOGY)
-    ipc_print_topology(&abuf);
-  /* hna */
+  if (send_what & SIW_LINKS)
+    ipc_print_links(&abuf);
+  if (send_what & SIW_ROUTES)
+    ipc_print_routes(&abuf);
   if (send_what & SIW_HNA)
     ipc_print_hna(&abuf);
-  /* sgw */
-  if (send_what & SIW_SGW)
-    ipc_print_sgw(&abuf);
-  /* mid */
   if (send_what & SIW_MID)
     ipc_print_mid(&abuf);
-  /* routes */
-  if (send_what & SIW_ROUTES)
-    ipc_print_routes(&abuf);
-  /* gateways */
+  if (send_what & SIW_TOPOLOGY)
+    ipc_print_topology(&abuf);
   if (send_what & SIW_GATEWAYS)
     ipc_print_gateways(&abuf);
-  /* config */
-  if (send_what & SIW_CONFIG)
-    ipc_print_olsrd_conf(&abuf);
-  /* interface */
   if (send_what & SIW_INTERFACES)
     ipc_print_interfaces(&abuf);
-  /* 2hop neighbour list */
   if (send_what & SIW_2HOP)
     ipc_print_neighbors(&abuf, true);
-  /* version */
+  if (send_what & SIW_SGW)
+    ipc_print_sgw(&abuf);
+
   if (send_what & SIW_VERSION)
     ipc_print_version(&abuf);
 
+  if (send_what & SIW_CONFIG)
+    ipc_print_olsrd_conf(&abuf);
+
   assert(outbuffer_count < MAX_CLIENTS);
 
   outbuffer[outbuffer_count] = olsr_malloc(abuf.len, PLUGIN_NAME" output buffer");