diff options
author | deva <deva> | 2008-08-04 10:31:45 +0000 |
---|---|---|
committer | deva <deva> | 2008-08-04 10:31:45 +0000 |
commit | 98b90925d863531c3a6c75de15fb686b1fb1891f (patch) | |
tree | 9e6e54df55f4b7e30c4b9c9d447dcd4fe150ff35 /server/src/journal_commit.cc | |
parent | bd8221d2791718f02ab1d067c797c62b29da9106 (diff) |
Made server able to run (compile-time) without postgres and the uploadserver. Fixed problems in the exclusion of pentominos support. Fixed bug in db query field iteration.
Diffstat (limited to 'server/src/journal_commit.cc')
-rw-r--r-- | server/src/journal_commit.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/server/src/journal_commit.cc b/server/src/journal_commit.cc index 95432b6..b1ae866 100644 --- a/server/src/journal_commit.cc +++ b/server/src/journal_commit.cc @@ -42,8 +42,6 @@ #include <fcntl.h> #include <time.h> -//#define NO_NETWORK - static int mwrite(int sock, const char *fmt, ...) { int l = 0; @@ -69,10 +67,11 @@ int journal_commit(const char *cpr, const char *user, const char *addr, unsigned short int port, const char *buf, size_t size) { - struct sockaddr_in sin; int sock = 1; -#ifndef NO_NETWORK +#ifndef WITHOUT_UPLOADSERVER + struct sockaddr_in sin; + // Do DNS lookup char *ip; struct in_addr **addr_list; @@ -104,7 +103,7 @@ int journal_commit(const char *cpr, const char *user, perror(":"); return -1; } -#endif/*NO_NETWORK*/ +#endif/*WITHOUT_UPLOADSERVER*/ // send header mwrite(sock, "PUT JOURNAL PROTO1.0 \r\n"); @@ -121,8 +120,10 @@ int journal_commit(const char *cpr, const char *user, fprintf(stderr, "write did not write all the bytes in the buffer.\n"); } +#ifndef WITHOUT_UPLOADSERVER // close socket close(sock); +#endif/*WITHOUT_UPLOADSERVER*/ return 0; } |