diff --git a/lib/dtsc.cpp b/lib/dtsc.cpp index 3cffd439..85c6c84d 100644 --- a/lib/dtsc.cpp +++ b/lib/dtsc.cpp @@ -530,7 +530,7 @@ DTSC::File::File(std::string filename, bool create){ } created = create; if ( !F){ - DEBUG_MSG(DLVL_ERROR, "Could not open file %s\n", filename.c_str()); + DEBUG_MSG(DLVL_ERROR, "Could not open file %s", filename.c_str()); return; } fseek(F, 0, SEEK_END); diff --git a/lib/json.cpp b/lib/json.cpp index d8daceb2..3bd9ea6d 100644 --- a/lib/json.cpp +++ b/lib/json.cpp @@ -1085,7 +1085,7 @@ void JSON::fromDTMI(const unsigned char * data, unsigned int len, unsigned int & break; } } - DEBUG_MSG(DLVL_FAIL, "Unimplemented DTMI type %hhx, @ %i / %i - returning.\n", data[i], i, len); + DEBUG_MSG(DLVL_FAIL, "Unimplemented DTMI type %hhx, @ %i / %i - returning.", data[i], i, len); i += 1; return; } //fromOneDTMI diff --git a/lib/socket.cpp b/lib/socket.cpp index 4120a9c1..21ebeb90 100644 --- a/lib/socket.cpp +++ b/lib/socket.cpp @@ -521,7 +521,7 @@ unsigned int Socket::Connection::iwrite(const void * buffer, int len){ if (errno != EPIPE){ Error = true; remotehost = strerror(errno); - DEBUG_MSG(DLVL_WARN, "Could not iwrite data! Error: %s\n", remotehost.c_str()); + DEBUG_MSG(DLVL_WARN, "Could not iwrite data! Error: %s", remotehost.c_str()); } close(); return 0; @@ -559,7 +559,7 @@ int Socket::Connection::iread(void * buffer, int len){ if (errno != EPIPE){ Error = true; remotehost = strerror(errno); - DEBUG_MSG(DLVL_WARN, "Could not iread data! Error: %s\n", remotehost.c_str()); + DEBUG_MSG(DLVL_WARN, "Could not iread data! Error: %s", remotehost.c_str()); } close(); return 0; @@ -683,17 +683,17 @@ bool Socket::Server::IPv6bind(int port, std::string hostname, bool nonblock){ if (ret == 0){ ret = listen(sock, 100); //start listening, backlog of 100 allowed if (ret == 0){ - DEBUG_MSG(DLVL_DEVEL, "IPv6 socket success @ %s:%i\n", hostname.c_str(), port); + DEBUG_MSG(DLVL_DEVEL, "IPv6 socket success @ %s:%i", hostname.c_str(), port); return true; }else{ errors = strerror(errno); - DEBUG_MSG(DLVL_ERROR, "IPv6 listen failed! Error: %s\n", errors.c_str()); + DEBUG_MSG(DLVL_ERROR, "IPv6 listen failed! Error: %s", errors.c_str()); close(); return false; } }else{ errors = strerror(errno); - DEBUG_MSG(DLVL_ERROR, "IPv6 Binding %s:%i failed (%s)\n", hostname.c_str(), port, errors.c_str()); + DEBUG_MSG(DLVL_ERROR, "IPv6 Binding %s:%i failed (%s)", hostname.c_str(), port, errors.c_str()); close(); return false; } @@ -730,17 +730,17 @@ bool Socket::Server::IPv4bind(int port, std::string hostname, bool nonblock){ if (ret == 0){ ret = listen(sock, 100); //start listening, backlog of 100 allowed if (ret == 0){ - DEBUG_MSG(DLVL_DEVEL, "IPv4 socket success @ %s:%i\n", hostname.c_str(), port); + DEBUG_MSG(DLVL_DEVEL, "IPv4 socket success @ %s:%i", hostname.c_str(), port); return true; }else{ errors = strerror(errno); - DEBUG_MSG(DLVL_ERROR, "IPv4 listen failed! Error: %s\n", errors.c_str()); + DEBUG_MSG(DLVL_ERROR, "IPv4 listen failed! Error: %s", errors.c_str()); close(); return false; } }else{ errors = strerror(errno); - DEBUG_MSG(DLVL_ERROR, "IPv4 Binding %s:%i failed (%s)\n", hostname.c_str(), port, errors.c_str()); + DEBUG_MSG(DLVL_ERROR, "IPv4 Binding %s:%i failed (%s)", hostname.c_str(), port, errors.c_str()); close(); return false; } @@ -775,13 +775,13 @@ Socket::Server::Server(std::string address, bool nonblock){ return; }else{ errors = strerror(errno); - DEBUG_MSG(DLVL_ERROR, "Unix listen failed! Error: %s\n", errors.c_str()); + DEBUG_MSG(DLVL_ERROR, "Unix listen failed! Error: %s", errors.c_str()); close(); return; } }else{ errors = strerror(errno); - DEBUG_MSG(DLVL_ERROR, "Unix Binding %s failed (%s)\n", address.c_str(), errors.c_str()); + DEBUG_MSG(DLVL_ERROR, "Unix Binding %s failed (%s)", address.c_str(), errors.c_str()); close(); return; }