-
-static int print_graph (const graph_list_t *gl, void *user_data) /* {{{ */
-{
- if (gl == NULL)
- return (EINVAL);
-
- printf ("host = %s; plugin = %s;", gl->host, gl->plugin);
- if (gl->plugin_instance != NULL)
- printf (" plugin_instance = %s;", gl->plugin_instance);
- printf (" type = %s;", gl->type);
- if (gl->type_instance != NULL)
- printf (" type_instance = %s;", gl->type_instance);
- printf ("\n");
-
- return (0);
-} /* }}} int print_graph */
-
-static int get_graphs_list (char ***ret_graphs, /* {{{ */
- size_t *ret_graphs_num)
-{
- gl_update ();
- gl_foreach (print_graph, /* user_data = */ NULL);
-
- return (0);
-} /* }}} int get_graphs_list */
-
-static int action_hello (void) /* {{{ */
-{
- printf ("Content-Type: text/plain\n\n");
-
- get_graphs_list (NULL, NULL);
-
- return (0);
-} /* }}} int action_hello */