-static char *http_info(void)
-{
- char *clnts = NULL, *ap = NULL, *ret;
- struct access_info *ai, *tmp_ai;
- struct http_client *hc, *tmp_hc;
-
- list_for_each_entry_safe(ai, tmp_ai, &http_acl, node) {
- char *tmp = make_message("%s%s/%d ", ap? ap : "",
- inet_ntoa(ai->addr), ai->netmask);
- free(ap);
- ap = tmp;
- }
- list_for_each_entry_safe(hc, tmp_hc, &clients, node) {
- char *tmp = make_message("%s%s ", clnts? clnts : "", hc->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",
- (self->status == SENDER_ON)? "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",
- ap? ap : "(none)"
- );
- free(ap);
- free(clnts);
- return ret;
-}
-
-static void init_acl(struct list_head *acl, char * const *acl_info, int num)