summaryrefslogtreecommitdiff
path: root/server/src/journal_commit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/journal_commit.cc')
-rw-r--r--server/src/journal_commit.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/server/src/journal_commit.cc b/server/src/journal_commit.cc
index 9d76c8f..734afcf 100644
--- a/server/src/journal_commit.cc
+++ b/server/src/journal_commit.cc
@@ -65,11 +65,10 @@ static int mwrite(int sock, const char *fmt, ...)
va_end(args);
if(sock != -1 && write(sock, buffer, l) != l) {
- PRACRO_ERR_LOG(journal,
- "write did not write all the bytes in the buffer.\n");
+ ERR_LOG(journal, "write did not write all the bytes in the buffer.\n");
}
- PRACRO_DEBUG(journal, "%s", buffer);
+ DEBUG(journal, "%s", buffer);
free(buffer);
return l;
@@ -90,7 +89,7 @@ int journal_commit(const char *cpr, const char *user,
struct hostent *he;
he = gethostbyname(addr);
if(!he || !he->h_length) {
- PRACRO_ERR_LOG(journal, "gethostbyname(%s) failed (errno=%d)!\n", addr, errno);
+ ERR_LOG(journal, "gethostbyname(%s) failed (errno=%d)!\n", addr, errno);
return -1;
}
@@ -105,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) {
- PRACRO_ERR_LOG(journal, "Socket() failed!\n");
+ ERR_LOG(journal, "Socket() failed!\n");
return -1;
}
if(connect(sock, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
- PRACRO_ERR_LOG(journal, "Connect() failed!\n");
+ ERR_LOG(journal, "Connect() failed!\n");
perror(":");
return -1;
}
@@ -133,9 +132,9 @@ 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()) {
- PRACRO_ERR_LOG(journal, "write did not write all the bytes in the buffer.\n");
+ ERR_LOG(journal, "write did not write all the bytes in the buffer.\n");
}
- PRACRO_DEBUG(journal, "%s\n", buf);
+ DEBUG(journal, "%s\n", buf);
#ifndef WITHOUT_UPLOADSERVER
// close socket