diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-05-06 22:35:06 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-05-06 22:35:18 +0000 |
commit | 0c918c095d8f611f8d0072db468e37683597ef01 (patch) | |
tree | 4b41bc94b5a360ba92b93fffe4aea210796024e2 /cmogstored.h | |
parent | f80c52cfe4e08fba39995830a3fcf5835d0bb846 (diff) | |
download | cmogstored-0c918c095d8f611f8d0072db468e37683597ef01.tar.gz |
There's no reason to be referencing FDs for these acceptors since they're infrequently accessed by svc, so this should make our internals more consistent. This also removes our use of mog_fd_get (outside of test code).
Diffstat (limited to 'cmogstored.h')
-rw-r--r-- | cmogstored.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cmogstored.h b/cmogstored.h index 62e9136..c958a87 100644 --- a/cmogstored.h +++ b/cmogstored.h @@ -146,9 +146,9 @@ struct mog_svc { LIST_HEAD(mgmt_head, mog_mgmt) devstats_subscribers; mode_t put_perms; mode_t mkcol_perms; - int http_fd; - int httpget_fd; - int mgmt_fd; + struct mog_fd *http_mfd; + struct mog_fd *httpget_mfd; + struct mog_fd *mgmt_mfd; uint32_t idle_timeout; }; @@ -224,10 +224,11 @@ typedef void (*mog_post_accept_fn)(int fd, struct mog_svc *, struct mog_accept { struct mog_svc *svc; mog_post_accept_fn post_accept_fn; + struct mog_addrinfo *addrinfo; /* shared with cfg */ struct mog_thrpool thrpool; }; -struct mog_accept *mog_accept_init(int fd, struct mog_svc *, - mog_post_accept_fn); +struct mog_fd *mog_accept_init(int fd, struct mog_svc *, + struct mog_addrinfo *, mog_post_accept_fn); void * mog_accept_loop(void *ac); struct mog_digest { @@ -411,7 +412,7 @@ struct mog_addrinfo { void mog_addrinfo_free(struct mog_addrinfo **); /* bind_listen.c */ -int mog_bind_listen(struct addrinfo *, const char *accept_filter); +int mog_bind_listen(struct addrinfo *); /* close.c */ void mog_close(int fd); |