diff options
Diffstat (limited to 'server/src/journal_commit.cc')
-rw-r--r-- | server/src/journal_commit.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/src/journal_commit.cc b/server/src/journal_commit.cc index 1bfd9e8..9460ce2 100644 --- a/server/src/journal_commit.cc +++ b/server/src/journal_commit.cc @@ -28,7 +28,7 @@ #include <config.h> -#include "debug.h" +#include <hugin.hpp> #include <string> @@ -65,7 +65,7 @@ static int mwrite(int sock, const char *fmt, ...) va_end(args); if(sock != -1 && write(sock, buffer, l) != l) { - ERR_LOG(journal, "write did not write all the bytes in the buffer.\n"); + ERR(journal, "write did not write all the bytes in the buffer.\n"); } DEBUG(journal, "%s", buffer); @@ -89,7 +89,7 @@ int journal_commit(const char *cpr, const char *user, struct hostent *he; he = gethostbyname(addr); if(!he || !he->h_length) { - ERR_LOG(journal, "gethostbyname(%s) failed (errno=%d)!\n", addr, errno); + ERR(journal, "gethostbyname(%s) failed (errno=%d)!\n", addr, errno); return -1; } @@ -104,12 +104,12 @@ int journal_commit(const char *cpr, const char *user, sin.sin_port = htons(port); if( (sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { - ERR_LOG(journal, "Socket() failed!\n"); + ERR(journal, "Socket() failed!\n"); return -1; } if(connect(sock, (struct sockaddr *) &sin, sizeof(sin)) < 0) { - ERR_LOG(journal, "Connect() failed: %s!\n", strerror(errno)); + ERR(journal, "Connect() failed: %s!\n", strerror(errno)); return -1; } #else @@ -131,7 +131,7 @@ int journal_commit(const char *cpr, const char *user, // send body if(sock != -1 && write(sock, resume.c_str(), resume.size()) != (ssize_t)resume.size()) { - ERR_LOG(journal, "write did not write all the bytes in the buffer.\n"); + ERR(journal, "write did not write all the bytes in the buffer.\n"); return -1; } DEBUG(journal, "%s\n", buf); |