summaryrefslogtreecommitdiff
path: root/src/base/tcp_server.c
diff options
context:
space:
mode:
authorDusan Durech <dusan.d@centrum.sk>2008-11-14 16:38:41 +0100
committerDusan Durech <dusan.d@centrum.sk>2008-11-14 16:38:41 +0100
commit98875c5a636f50fe89b9394b8193e86094ae14e0 (patch)
tree305f1a3c884763aff65f8bcd12ff9d2f648a04cd /src/base/tcp_server.c
parent957f3411170ca1d5f30ee2e2c4e25393195cce75 (diff)
uses new macro DEBUG_MSG
Diffstat (limited to 'src/base/tcp_server.c')
-rw-r--r--src/base/tcp_server.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/src/base/tcp_server.c b/src/base/tcp_server.c
index aeb3b8c..b781fb5 100644
--- a/src/base/tcp_server.c
+++ b/src/base/tcp_server.c
@@ -130,14 +130,11 @@ int initTcpServer(char *ip4, int port4, char *ip6, int port6)
if (sock_server_tcp != NULL) {
ret++;
disableNagle(sock_server_tcp);
-#ifdef DEBUG
- printf(_("Starting server: \"%s\" on port: \"%d\"\n"), ip4, port4);
-#endif
+
+ DEBUG_MSG(_("Starting server: \"%s\" on port: \"%d\"\n"), ip4, port4);
} else {
-#ifdef DEBUG
- printf(_("Starting server: \"%s\" on port: \"%d\" FAILED!\n"),
- ip4, port4);
-#endif
+ DEBUG_MSG(_("Starting server: \"%s\" on port: \"%d\" FAILED!\n"), ip4, port4);
+
}
}
@@ -147,14 +144,11 @@ int initTcpServer(char *ip4, int port4, char *ip6, int port6)
if (sock_server_tcp_second != NULL) {
ret++;
disableNagle(sock_server_tcp_second);
-#ifdef DEBUG
- printf(_("Starting server: \"%s\" on port: \"%d\"\n"), ip6, port6);
-#endif
+
+ DEBUG_MSG(_("Starting server: \"%s\" on port: \"%d\"\n"), ip6, port6);
} else {
-#ifdef DEBUG
- printf(_("Starting server: \"%s\" on port: \"%d\" FAILED!\n"),
- ip6, port6);
-#endif
+
+ DEBUG_MSG(_("Starting server: \"%s\" on port: \"%d\" FAILED!\n"), ip6, port6);
}
}
@@ -284,20 +278,14 @@ int selectServerTcpSocket()
void quitTcpServer()
{
if (sock_server_tcp != NULL) {
-#ifdef DEBUG
- printf(_("Closing port: \"%d\"\n"), getSockTcpPort(sock_server_tcp));
-#endif
+ DEBUG_MSG(_("Closing port: \"%d\"\n"), getSockTcpPort(sock_server_tcp));
closeTcpSocket(sock_server_tcp);
}
if (sock_server_tcp_second != NULL) {
-#ifdef DEBUG
- printf(_("Closing port: \"%d\"\n"),
- getSockTcpPort(sock_server_tcp_second));
-#endif
+ DEBUG_MSG(_("Closing port: \"%d\"\n"), getSockTcpPort(sock_server_tcp_second));
closeTcpSocket(sock_server_tcp_second);
}
-#ifdef DEBUG
- printf("Quitting TCP\n");
-#endif
+
+ DEBUG_MSG("Quitting TCP\n");
}