diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-11 09:18:30 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-11 09:18:30 +0000 |
commit | 15e60fdf0c1dadf79b319635c4b6fe6786f1d3d4 (patch) | |
tree | 2e4d49630604eb4f4227e546aaae99210c10ab3a /config.c | |
parent | 2e880a57f8bd6f9e8b10f9fbdb9feea35523226d (diff) |
simplify ocsp sending using config_send_file
while here add an explicit flush to avoid a fd rampage.
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -323,11 +323,10 @@ config_send(struct conf *conf) return -1; if (h->ocsp_path != NULL) { - log_debug("sending ocsp %s", h->ocsp_path); - if ((fd = open(h->ocsp_path, O_RDONLY)) == -1) - fatal("can't open %s", h->ocsp_path); - if (config_send_file(ps, PROC_SERVER, IMSG_RECONF_OCSP, - fd, NULL, 0) == -1) + if (config_open_send(ps, PROC_SERVER, IMSG_RECONF_OCSP, + h->ocsp_path) == -1) + return -1; + if (proc_flush_imsg(ps, PROC_SERVER, -1) == -1) return -1; } |