Skip to content

Commit

Permalink
drivers/dstate.c: sock_open(): report path to sockfn (or WIN32 named …
Browse files Browse the repository at this point in the history
…pipe) the driver now listens on [networkupstools#2764]

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jan 18, 2025
1 parent 5a8de29 commit d67fcd3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/dstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ static TYPE_FD sock_open(const char *fn)
fatal_with_errno(EXIT_FAILURE, "listen(%d, %d) failed", fd, DS_LISTEN_BACKLOG);
}

upslogx(LOG_INFO, "Listening on socket %s", sockfn);

#else /* WIN32 */

fd = CreateNamedPipe(
Expand Down Expand Up @@ -198,6 +200,9 @@ static TYPE_FD sock_open(const char *fn)

/* Wait for a connection */
ConnectNamedPipe(fd,&connect_overlapped);

upslogx(LOG_INFO, "Listening on named pipe %s", fn);

#endif

return fd;
Expand Down

0 comments on commit d67fcd3

Please sign in to comment.