aboutsummaryrefslogtreecommitdiff
path: root/logger.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-01-21 19:40:06 +0000
committerOmar Polo <op@omarpolo.com>2024-01-21 19:40:06 +0000
commit83a2644bfb1d8683faf024275a98600b0edc5063 (patch)
treeea0783914312c1cf661315acd15ef787ad24b85c /logger.c
parent4f3b85e6d72b0df0b6264baf711290af4661807d (diff)
convert remaining code to the imsg getters
Now gmid doesn't touch anymore the internals of the imsg structs.
Diffstat (limited to 'logger.c')
-rw-r--r--logger.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/logger.c b/logger.c
index 1398686..c4bd96b 100644
--- a/logger.c
+++ b/logger.c
@@ -79,7 +79,7 @@ logger_shutdown(void)
static int
logger_dispatch_parent(int fd, struct privsep_proc *p, struct imsg *imsg)
{
- switch (imsg->hdr.type) {
+ switch (imsg_get_type(imsg)) {
case IMSG_LOG_FACILITY:
if (imsg_get_data(imsg, &facility, sizeof(facility)) == -1)
fatal("corrupted IMSG_LOG_SYSLOG");
@@ -108,7 +108,7 @@ logger_dispatch_server(int fd, struct privsep_proc *p, struct imsg *imsg)
size_t datalen = 0;
struct ibuf ibuf;
- switch (imsg->hdr.type) {
+ switch (imsg_get_type(imsg)) {
case IMSG_LOG_REQUEST:
if (imsg_get_ibuf(imsg, &ibuf) == -1 ||
(datalen = ibuf_size(&ibuf)) == 0)