From c91498c0a2ee8bcc7dbce501c75389edc4b7d4dd Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Sat, 25 May 2024 14:33:14 +0200 Subject: [PATCH] add LF to error message --- ircpipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ircpipe.c b/ircpipe.c index f9069a9..b8b176d 100644 --- a/ircpipe.c +++ b/ircpipe.c @@ -68,7 +68,7 @@ sock_t irc_connect(const char *host, const char *port, const int tls, const char for (r = results; r != NULL; r = r->ai_next) { sock.fd = socket(r->ai_family, SOCK_STREAM, 0); - if (sock.fd < 0) continue; /* try next; todo: should check errno */ + if (sock.fd < 0) continue; setsockopt(sock.fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof timeout) OR_DIE; if (connect(sock.fd, r->ai_addr, r->ai_addrlen) == 0) @@ -304,7 +304,7 @@ int irc_poll(const sock_t sock, const int infd, const int outfd) { if (want_pong && irc_time() - recv_ts > PING_INTERVAL + PONG_TIMEOUT) { /* pong timeout reached, abort. */ - fprintf(stderr, "PONG timeout"); + fprintf(stderr, "PONG timeout\n"); return -1; } else if (!want_pong && irc_time() - recv_ts > PING_INTERVAL) { /* haven't rx'd anything in a while, sending ping. */ -- 2.39.3