about summary refs log tree commit homepage
path: root/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'exit.c')
-rw-r--r--exit.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/exit.c b/exit.c
index 5f2a0a8..719d1bd 100644
--- a/exit.c
+++ b/exit.c
@@ -5,17 +5,16 @@
 #include "cmogstored.h"
 #include "nostd/setproctitle.h"
 
-static void acceptor_quit(int *fdp)
+static void acceptor_quit(struct mog_fd **mfdp)
 {
-        int fd = *fdp;
+        struct mog_fd *mfd = *mfdp;
 
-        if (fd >= 0) {
-                struct mog_fd *mfd = mog_fd_get(fd);
+        if (mfd) {
                 struct mog_accept *ac = &mfd->as.accept;
 
                 mog_thrpool_quit(&ac->thrpool, NULL);
                 mog_fd_put(mfd);
-                *fdp = -1;
+                *mfdp = NULL;
         }
 }
 
@@ -23,9 +22,9 @@ static bool svc_quit_accept_i(void *svcptr, void *ignored)
 {
         struct mog_svc *svc = svcptr;
 
-        acceptor_quit(&svc->mgmt_fd);
-        acceptor_quit(&svc->http_fd);
-        acceptor_quit(&svc->httpget_fd);
+        acceptor_quit(&svc->mgmt_mfd);
+        acceptor_quit(&svc->http_mfd);
+        acceptor_quit(&svc->httpget_mfd);
 
         return true;
 }