phroxy

Gopher to HTTP proxy
git clone git://git.z3bra.org/phroxy.git
Log | Files | Refs | LICENSE

commit c98cfd1ee68525144b1041c72d41b14febb33677
parent 338b20f4ebd64a68962bedde167b480c3ceb3dee
Author: Willy Goiffon <dev@z3bra.org>
Date:   Tue, 15 Sep 2020 13:46:12 +0200

Add newlines in error messages

Diffstat:
Mphroxy.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/phroxy.c b/phroxy.c @@ -50,7 +50,7 @@ connectto(const char *host, const char *port) sigprocmask(SIG_BLOCK, &set, &oset); if ((r = getaddrinfo(host, port, &hints, &addrs))) { - fprintf(stderr, "Can't resolve hostname \"%s\": %s", host, gai_strerror(r)); + fprintf(stderr, "Can't resolve hostname \"%s\": %s\n", host, gai_strerror(r)); goto err; } @@ -68,11 +68,11 @@ connectto(const char *host, const char *port) freeaddrinfo(addrs); if (sock < 0) { - fprintf(stderr, "Can't open socket: %s", strerror(errno)); + fprintf(stderr, "Can't open socket: %s\n", strerror(errno)); goto err; } if (r < 0) { - fprintf(stderr, "Can't connect to: %s:%s: %s", host, port, strerror(errno)); + fprintf(stderr, "Can't connect to: %s:%s: %s\n", host, port, strerror(errno)); goto err; } @@ -102,7 +102,7 @@ sendselector(int sock, const char *selector) free(msg); if (n == -1) - fprintf(stderr, "Can't send message: %s", strerror(errno)); + fprintf(stderr, "Can't send message: %s\n", strerror(errno)); return n; } @@ -133,7 +133,7 @@ getrawitem(int sock, size_t *sz) *sz = buf - raw; if (n < 0) { - fprintf(stderr, "Can't read socket: %s", strerror(errno)); + fprintf(stderr, "Can't read socket: %s\n", strerror(errno)); free(raw); }