diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2015-11-08 03:38:00 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-11-08 03:38:00 +0100 |
commit | b4c54f97ce9f2b477c97059cbea9082b7a7494a3 (patch) | |
tree | 8cbf120f7df413cfae6d525b6a762c4592de5993 /src/log.c | |
parent | b153e8ba4dc72cbb595ee1b292791a8a6c3ca691 (diff) | |
download | bluez-b4c54f97ce9f2b477c97059cbea9082b7a7494a3.tar.gz |
monitor: Do not abort user logging for invalid index messages
Diffstat (limited to 'src/log.c')
-rw-r--r-- | src/log.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -26,8 +26,9 @@ #endif #include <stdio.h> -#include <stdarg.h> +#include <errno.h> #include <syslog.h> +#include <stdarg.h> #include <stdint.h> #include <stdlib.h> #include <unistd.h> @@ -121,8 +122,10 @@ static void logging_log(uint16_t index, int priority, msg.msg_iovlen = 3; if (sendmsg(logging_fd, &msg, 0) < 0) { - close(logging_fd); - logging_fd = -1; + if (errno != ENODEV) { + close(logging_fd); + logging_fd = -1; + } } free(str); |