commit - 52856281f168e93fabe5354254b2b763bd7c2da5
commit + ea8874f15243d7c4d6a28836a26ce3724aa1e037
blob - 9e864662ffe2ebdc2992a50ac0b916acde9240ca
blob + ef100583d3b7bd999204b147ad690a6d65a212a5
--- fcgi.c
+++ fcgi.c
}
void
-fcgi_accept(struct galileo *env)
+fcgi_accept(int fd, short event, void *arg)
{
+ struct galileo *env = arg;
struct fcgi *fcgi = NULL;
socklen_t slen;
struct sockaddr_storage ss;
int s = -1;
+ event_add(&env->sc_evpause, NULL);
+ if ((event & EV_TIMEOUT))
+ return;
+
slen = sizeof(ss);
if ((s = accept_reserve(env->sc_sock_fd, (struct sockaddr *)&ss,
&slen, FD_RESERVE, &fcgi_inflight)) == -1) {
blob - c747646dcc2b530e8588dd5b4af217d827d51fbd
blob + fc08077639750af2413c0d69504d7e94fe50fb01
--- galileo.h
+++ galileo.h
/* fcgi.c */
int fcgi_end_request(struct client *, int);
int fcgi_abort_request(struct client *);
-void fcgi_accept(struct galileo *);
+void fcgi_accept(int, short, void *);
void fcgi_read(struct bufferevent *, void *);
void fcgi_write(struct bufferevent *, void *);
void fcgi_error(struct bufferevent *, short error, void *);
blob - c8aeb21b92288169a1883ad7d5651ad13d5a08af
blob + 52a332a32bb1b4a8aee7973e0430318390c3945e
--- proxy.c
+++ proxy.c
void proxy_init(struct privsep *, struct privsep_proc *, void *);
int proxy_launch(struct galileo *);
-void proxy_accept(int, short, void *);
void proxy_inflight_dec(const char *);
int proxy_dispatch_parent(int, struct privsep_proc *, struct imsg *);
void proxy_resolved(struct asr_result *, void *);
void
proxy_purge(struct server *srv)
{
-}
-
-void
-proxy_accept(int fd, short event, void *arg)
-{
- struct galileo *env = arg;
-
- log_debug("%s", __func__);
- fcgi_accept(env);
}
void
fatal("config_getsock");
event_set(&env->sc_evsock, env->sc_sock_fd,
- EV_READ | EV_PERSIST, proxy_accept, env);
+ EV_READ | EV_PERSIST, fcgi_accept, env);
event_add(&env->sc_evsock, NULL);
- /* evtimer_set(&env->sc_evpause, proxy_accept_paused, env); */
+ evtimer_set(&env->sc_evpause, fcgi_accept, env);
break;
case IMSG_CFG_DONE:
log_debug("config done!");