From 349263a88c736af830c000a29a2710c46d1ff249 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 4 Feb 2018 20:55:20 -1000 Subject: [PATCH] Logging changes --- lib/Socket.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Socket.cpp b/lib/Socket.cpp index 11c5b5e..6d7f056 100644 --- a/lib/Socket.cpp +++ b/lib/Socket.cpp @@ -98,7 +98,7 @@ bool Socket::openSocket() m_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (m_socket == -1) { - fprintf(stderr, "Can't allocate socket"); + fprintf(stderr, "Can't allocate socket\n"); return false; } @@ -158,14 +158,14 @@ bool Socket::openAndListen(const IPAddress& address, uint32_t port) if (bind(m_socket, reinterpret_cast(&addr), sizeof(addr)) == -1) { /* Not likely to happen, but... */ - fprintf(stderr, "Failed to bind listener socket to port %d", port); + //fprintf(stderr, "Failed to bind listener socket to port %d\n", port); return false; } if (::listen(m_socket, 0) == -1) { /* Oops, socket is deaf */ - fprintf(stderr, "Failed to listen to port %d", port); + //fprintf(stderr, "Failed to listen to port %d\n", port); return false; } @@ -187,7 +187,7 @@ Socket::EResult Socket::accept(Socket& remoteSocketOut, sockaddr_in& fromAddress #ifndef _WIN32 EResult res = (errno == EAGAIN) ? EResult::Busy : EResult::Error; if (res == EResult::Error) - fprintf(stderr, "Failed to accept incoming connection: %s", strerror(errno)); + fprintf(stderr, "Failed to accept incoming connection: %s\n", strerror(errno)); #else EResult res = LastWSAError(); if (res == EResult::Error)