diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-08 15:57:11 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-08 15:57:11 +0000 |
commit | e69e1151f696b01d1fe80570901d21bc78ed5ab1 (patch) | |
tree | 8fe1bea21917b3015e7d34f397654f64d2f71171 /utils.c | |
parent | 2b4ef796d78a9d76952115852e3aef56f00b7beb (diff) |
drop now unused dispatch_imsg
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 30 |
1 files changed, 0 insertions, 30 deletions
@@ -241,33 +241,3 @@ end: X509_STORE_CTX_free(ctx); return ret; } - -void -dispatch_imsg(struct imsgbuf *ibuf, imsg_handlerfn **handlers, size_t size) -{ - struct imsg imsg; - size_t datalen, i; - ssize_t n; - - if ((n = imsg_read(ibuf)) == -1) { - if (errno == EAGAIN || errno == EWOULDBLOCK) - return; - _exit(1); - } - - if (n == 0) - _exit(1); - - for (;;) { - if ((n = imsg_get(ibuf, &imsg)) == -1) - _exit(1); - if (n == 0) - return; - datalen = imsg.hdr.len - IMSG_HEADER_SIZE; - i = imsg.hdr.type; - if (i > (size / sizeof(imsg_handlerfn*)) || handlers[i] == NULL) - abort(); - handlers[i](ibuf, &imsg, datalen); - imsg_free(&imsg); - } -} |