Diff between b153e8ba4dc72cbb595ee1b292791a8a6c3ca691 and b4c54f97ce9f2b477c97059cbea9082b7a7494a3
Changed Files
| File | Additions | Deletions | Status |
| src/log.c | +6 | -3 | modified |
Full Patch
diff --git a/src/log.c b/src/log.c
index 0442c26..970708d 100644
--- a/src/log.c
+++ b/src/log.c
@@ -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);