summaryrefslogtreecommitdiff
path: root/src/ivysocket.c
diff options
context:
space:
mode:
authorfcolin2006-04-20 15:51:37 +0000
committerfcolin2006-04-20 15:51:37 +0000
commitd20808b04feb328272a35ee2b03f4ae19db23fbe (patch)
tree070f5efb4b7f9b4603a8d2d830c8ef5210495572 /src/ivysocket.c
parent68372c19d14986d372918cd268d5855fd7665fc3 (diff)
downloadivy-c-d20808b04feb328272a35ee2b03f4ae19db23fbe.zip
ivy-c-d20808b04feb328272a35ee2b03f4ae19db23fbe.tar.gz
ivy-c-d20808b04feb328272a35ee2b03f4ae19db23fbe.tar.bz2
ivy-c-d20808b04feb328272a35ee2b03f4ae19db23fbe.tar.xz
cleanup DEBUG code
Diffstat (limited to 'src/ivysocket.c')
-rw-r--r--src/ivysocket.c17
1 files changed, 7 insertions, 10 deletions
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;