-/**
- * Describes one queued chunk of the chunk queue.
- *
- * The send function of the http sender checks each client fd for writing. If a
- * client fd is not ready, it tries to queue that chunk for this client until
- * the number of queued bytes exceeds \p MAX_BACKLOG.
- */
-struct queued_chunk {
- /** The number of the queued chunk, -1U means header. */
- unsigned chunk_num;
- /** The number of bytes already sent. */
- unsigned sent;
- /** Position of the chunk in the chunk queue. */
- struct list_head node;
-};
-
-/**
- * Describes one entry in the blacklist/whitelist of the http sender.
- */
-struct access_info {
- /** The address to be black/whitelisted. */
- struct in_addr addr;
- /** The netmask for this entry. */
- unsigned netmask;
- /** The position of this entry in the access_perm_list. */
- struct list_head node;
-};
-
-static int server_fd = -1, numclients;
-static struct sender *self;
-
-static void http_shutdown_client(struct http_client *hc, const char *msg)
-{
- struct queued_chunk *qc, *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(qc, tmp, &hc->cq.q, node) {
- list_del(&qc->node);
- free(qc);
- }
- 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");
-}