-static int server_fd = -1, numclients;
-static struct sender *self;
-
-
-static void http_shutdown_client(struct http_client *hc, const char *msg)
-{
- struct queued_packet *qp, *tmp;
- PARA_INFO_LOG("shutting down %s on fd %d (%s)\n", CLIENT_ADDR(hc),
- hc->fd, msg);
- numclients--;
- close(hc->fd);
- del_close_on_fork_list(hc->fd);
- list_for_each_entry_safe(qp, tmp, &hc->packet_queue, node) {
- free(qp->packet);
- list_del(&qp->node);
- free(qp);
- }
- list_del(&hc->node);
- free(hc);
-}
-
-static void http_shutdown_clients(void)
-{
- struct http_client *hc, *tmp;
- list_for_each_entry_safe(hc, tmp, &clients, node)
- http_shutdown_client(hc, "vss request");
-}
-
-static int http_send_msg(struct http_client *hc, const char *msg)