From d20808b04feb328272a35ee2b03f4ae19db23fbe Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 20 Apr 2006 15:51:37 +0000 Subject: cleanup DEBUG code --- src/ivysocket.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/ivysocket.c') diff --git a/src/ivysocket.c b/src/ivysocket.c index 5b2fa93..d38f66a 100644 --- a/src/ivysocket.c +++ b/src/ivysocket.c @@ -42,6 +42,7 @@ #include "ivysocket.h" #include "ivyloop.h" #include "ivybuffer.h" +#include "ivydebug.h" #define BUFFER_SIZE 4096 /* taille buffer initiale on multiple pas deux a chaque realloc */ @@ -75,11 +76,7 @@ struct _client { static Server servers_list = NULL; static Client clients_list = NULL; -#ifdef DEBUG -static int debug_send = 1; -#else static int debug_send = 0; -#endif #ifdef WIN32 WSADATA WsaData; @@ -180,18 +177,18 @@ static void HandleServer(Channel channel, HANDLE fd, void *data) HANDLE ns; socklen_t addrlen; struct sockaddr_in remote2; -#ifdef DEBUG - printf( "Accepting Connection...\n"); -#endif //DEBUG + + TRACE( "Accepting Connection...\n"); + addrlen = sizeof (remote2 ); if ((ns = accept (fd, (struct sockaddr *)&remote2, &addrlen)) <0) { perror ("*** accept ***"); return; }; -#ifdef DEBUG - printf( "Accepting Connection ret\n"); -#endif //DEBUG + + TRACE( "Accepting Connection ret\n"); + IVY_LIST_ADD_START (clients_list, client ); client->buffer_size = BUFFER_SIZE; -- cgit v1.1