- char *clnts = NULL, *ret;
- struct sender_client *sc, *tmp_sc;
-
- char *acl_contents = acl_get_contents(&http_acl);
- list_for_each_entry_safe(sc, tmp_sc, &clients, node) {
- char *tmp = make_message("%s%s ", clnts? clnts : "", sc->name);
- free(clnts);
- clnts = tmp;
- }
- ret = make_message(
- "http status: %s\n"
- "http tcp port: %d\n"
- "http clients: %d\n"
- "http maximal number of clients: %d%s\n"
- "http connected clients: %s\n"
- "http access %s list: %s\n",
- (listen_fd >= 0)? "on" : "off",
- conf.http_port_arg,
- numclients,
- conf.http_max_clients_arg,
- conf.http_max_clients_arg > 0? "" : " (unlimited)",
- clnts? clnts : "(none)",
- conf.http_default_deny_given? "allow" : "deny",
- acl_contents? acl_contents : "(none)"
- );
- free(acl_contents);
- free(clnts);
- return ret;
-}
-
-static char *http_help(void)
-{
- return make_message(
- "usage: {on|off}\n"
- "usage: {allow|deny} IP mask\n"
- "example: allow 127.0.0.1 32\n"
- );