Skip to content

Commit c8bdd10

Browse files
committed
common/wincompat.c: syslog(), send_to_named_pipe(): debug-log when we failed to open existing NAMED_PIPE and so move on [#3302]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent b0e2199 commit c8bdd10

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

common/wincompat.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,10 @@ void syslog(int priority, const char *fmt, ...)
490490
NULL); /* no template file */
491491

492492
if (pipe == INVALID_HANDLE_VALUE) {
493+
upsdebug_with_errno(1,
494+
"%s: SKIP: can't open existing event log NAMED_PIPE: '%s'",
495+
__func__, pipe_full_name);
496+
493497
return;
494498
}
495499

@@ -689,6 +693,10 @@ int send_to_named_pipe(const char * pipe_name, const char * data)
689693
NULL); /* no template file */
690694

691695
if (pipe == INVALID_HANDLE_VALUE) {
696+
upsdebug_with_errno(1,
697+
"%s: SKIP: can't open existing NAMED_PIPE: '%s'",
698+
__func__, pipe_full_name);
699+
692700
return 1;
693701
}
694702

0 commit comments

Comments
 (0)