cmogstored 1.8.1 - use default system stack size
[cmogstored.git] / accept.c
blob916ded304e8793238d07536c58664d9e2f8ccf81
1 /*
2 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
3 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
4 */
5 #include "cmogstored.h"
7 struct mog_fd *
8 mog_accept_init(int fd, struct mog_svc *svc,
9 struct mog_addrinfo *a, mog_post_accept_fn fn)
11 struct mog_fd *mfd = mog_fd_init(fd, MOG_FD_TYPE_ACCEPT);
12 struct mog_accept *ac = &mfd->as.accept;
14 ac->post_accept_fn = fn;
15 ac->svc = svc;
16 ac->addrinfo = a;
17 memset(&ac->thrpool, 0, sizeof(struct mog_thrpool));
19 return mfd;