commit - c19738c9ed1553d21d6acaecb58a6fa9d966b63b
commit + 1f6ec0684239b7d7a1b63040f34db7d348fe5cb7
blob - d0dc794c095a2c72286db85cd8e2409b24e332b0
blob + c59d9dd4fdcf5133bae8ce3411896c675c37f956
--- gotwebd/sockets.c
+++ gotwebd/sockets.c
volatile int client_cnt;
-struct timeval timeout = { TIMEOUT_DEFAULT, 0 };
+static struct timeval timeout = { TIMEOUT_DEFAULT, 0 };
-void sockets_sighdlr(int, short, void *);
-void sockets_run(struct privsep *, struct privsep_proc *, void *);
-void sockets_launch(void);
-void sockets_purge(struct gotwebd *);
-void sockets_accept_paused(int, short, void *);
-void sockets_rlimit(int);
+static void sockets_sighdlr(int, short, void *);
+static void sockets_run(struct privsep *, struct privsep_proc *, void *);
+static void sockets_launch(void);
+static void sockets_purge(struct gotwebd *);
+static void sockets_accept_paused(int, short, void *);
+static void sockets_rlimit(int);
+static int sockets_dispatch_gotwebd(int, struct privsep_proc *,
+ struct imsg *);
+static int sockets_unix_socket_listen(struct privsep *, struct socket *);
+static int sockets_create_socket(struct address *, in_port_t);
+static int sockets_accept_reserve(int, struct sockaddr *, socklen_t *,
+ int, volatile int *);
-int sockets_dispatch_gotwebd(int, struct privsep_proc *, struct imsg *);
-int sockets_unix_socket_listen(struct privsep *, struct socket *);
-int sockets_create_socket(struct address *, in_port_t);
-int sockets_accept_reserve(int, struct sockaddr *, socklen_t *, int,
- volatile int *);
-
-struct socket *sockets_conf_new_socket_unix(struct gotwebd *, struct server *,
- int);
-struct socket *sockets_conf_new_socket_fcgi(struct gotwebd *, struct server *,
- int, struct address *);
+static struct socket *sockets_conf_new_socket_unix(struct gotwebd *,
+ struct server *, int);
+static struct socket *sockets_conf_new_socket_fcgi(struct gotwebd *,
+ struct server *, int, struct address *);
int cgi_inflight = 0;
proc_run(ps, p, procs, nitems(procs), sockets_run, NULL);
}
-void
+static void
sockets_run(struct privsep *ps, struct privsep_proc *p, void *arg)
{
if (config_init(ps->ps_env) == -1)
}
}
-struct socket *
+static struct socket *
sockets_conf_new_socket_unix(struct gotwebd *env, struct server *srv, int id)
{
struct socket *sock;
return sock;
}
-struct socket *
+static struct socket *
sockets_conf_new_socket_fcgi(struct gotwebd *env, struct server *srv, int id,
struct address *a)
{
return (sock);
}
-void
+static void
sockets_launch(void)
{
struct socket *sock;
}
}
-void
+static void
sockets_purge(struct gotwebd *env)
{
struct socket *sock, *tsock;
}
}
-int
+static int
sockets_dispatch_gotwebd(int fd, struct privsep_proc *p, struct imsg *imsg)
{
struct privsep *ps = p->p_ps;
return 0;
}
-void
+static void
sockets_sighdlr(int sig, short event, void *arg)
{
switch (sig) {
return 0;
}
-int
+static int
sockets_unix_socket_listen(struct privsep *ps, struct socket *sock)
{
struct gotwebd *env = ps->ps_env;
return u_fd;
}
-int
+static int
sockets_create_socket(struct address *a, in_port_t port)
{
struct addrinfo hints;
return (fd);
}
-int
+static int
sockets_accept_reserve(int sockfd, struct sockaddr *addr, socklen_t *addrlen,
int reserve, volatile int *counter)
{
return ret;
}
-void
+static void
sockets_accept_paused(int fd, short events, void *arg)
{
struct socket *sock = (struct socket *)arg;
free(c);
}
-void
+static void
sockets_rlimit(int maxfd)
{
struct rlimit rl;