summaryrefslogtreecommitdiff
path: root/src/ivysocket.c
diff options
context:
space:
mode:
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;