From 98875c5a636f50fe89b9394b8193e86094ae14e0 Mon Sep 17 00:00:00 2001 From: Dusan Durech Date: Fri, 14 Nov 2008 16:38:41 +0100 Subject: uses new macro DEBUG_MSG --- src/client/client.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/client/client.c') diff --git a/src/client/client.c b/src/client/client.c index 1f309fa..11d8018 100644 --- a/src/client/client.c +++ b/src/client/client.c @@ -95,9 +95,9 @@ static int initUdpClient(char *ip, int port, int proto) if (sock_server_udp == NULL) { return -1; } -#ifdef DEBUG - printf(_("Connected to: %s on port: %d via UDP\n"), ip, port); -#endif + + DEBUG_MSG(_("Connected to: %s on port: %d via UDP\n"), ip, port); + return 0; } @@ -134,8 +134,7 @@ int initClient(char *ip, int port, int proto) static void errorWithServer() { fprintf(stderr, _("Server did not respond!\n")); - setMsgToAnalyze(_ - ("Server is not running or being blocked. I was unable to connect.")); + setMsgToAnalyze(_("Server is not running or being blocked. I was unable to connect.")); setWorldEnd(); } @@ -315,10 +314,9 @@ static void eventTraffic() if (currentTime - lastTraffic > 5000) { lastTraffic = currentTime; -# ifdef DEBUG - printf(_("down: %d\n") - _("up : %d\n"), traffic_down, traffic_up); -# endif + + DEBUG_MSG(_("down: %d\n") _("up : %d\n"), traffic_down, traffic_up); + traffic_down = 0; traffic_up = 0; } @@ -342,9 +340,8 @@ static void quitUdpClient() { assert(sock_server_udp != NULL); closeUdpSocket(sock_server_udp); -#ifdef DEBUG - printf(_("Closing UDP connection.\n")); -#endif + + DEBUG_MSG(_("Closing UDP connection.\n")); } void quitClient() -- cgit v1.2.3