"list graphs" and "list hosts" actions: Add links to the "search" action.
[collection4.git] / src / graph_list.c
index 60ac94f..e0f2b97 100644 (file)
@@ -158,7 +158,7 @@ static int gl_clear_hosts (void) /* {{{ */
 
 static int gl_compare_hosts (const void *v0, const void *v1) /* {{{ */
 {
-  return (strcmp (v0, v1));
+  return (strcmp (*(char * const *) v0, *(char * const *) v1));
 } /* }}} int gl_compare_hosts */
 
 static int gl_register_file (const graph_ident_t *file, /* {{{ */
@@ -467,6 +467,7 @@ int gl_update (void) /* {{{ */
 {
   time_t now;
   int status;
+  size_t i;
 
   /*
   printf ("Content-Type: text/plain\n\n");
@@ -492,6 +493,9 @@ int gl_update (void) /* {{{ */
 
   gl_last_update = now;
 
+  for (i = 0; i < gl_active_num; i++)
+    graph_sort_instances (gl_active[i]);
+
   return (status);
 } /* }}} int gl_update */