fix wrong arguments order for send_log

This commit is contained in:
Omar Polo 2021-08-23 22:36:01 +00:00
parent 03747a6c51
commit ef352ec3b8
1 changed files with 3 additions and 3 deletions

6
log.c
View File

@ -95,7 +95,7 @@ fatal(const char *fmt, ...)
va_start(ap, fmt);
if ((r = vasprintf(&fmted, fmt, ap)) != -1) {
send_log(LOG_CRIT, IMSG_LOG, fmted, r+1);
send_log(IMSG_LOG, LOG_CRIT, fmted, r+1);
free(fmted);
/* wait for the logger process to shut down */
@ -140,7 +140,7 @@ vlog(int priority, struct client *c,
if (ec < 0)
fatal("asprintf: %s", strerror(errno));
send_log(priority, IMSG_LOG, s, ec+1);
send_log(IMSG_LOG, priority, s, ec+1);
free(fmted);
free(s);
@ -253,7 +253,7 @@ log_request(struct client *c, char *meta, size_t l)
(int)(t-meta), meta);
if (ec < 0)
err(1, "asprintf");
send_log(LOG_NOTICE, IMSG_LOG_REQUEST, fmted, ec+1);
send_log(IMSG_LOG_REQUEST, LOG_NOTICE, fmted, ec+1);
free(fmted);
}