fixes for windows
authorLaurent Mazet <laurent.mazet@thalesgroup.com>
Mon, 15 May 2023 12:26:31 +0000 (14:26 +0200)
committerLaurent Mazet <laurent.mazet@thalesgroup.com>
Mon, 15 May 2023 12:26:31 +0000 (14:26 +0200)
server.c
webserver.c

index 4f3b24f1c56374d326079c9d904b45e42b4e2504..cc7f4cd2bf50ee432b686483ba18c726121719da 100644 (file)
--- a/server.c
+++ b/server.c
@@ -19,6 +19,7 @@
 //#include <sys/socket.h>
 #include <sys/select.h>
 #endif
+#include <unistd.h>
 
 #include "debug.h"
 
@@ -82,7 +83,7 @@ socket_t open_listening_socket (int port)
     }
 
     struct sockaddr_in addr = {0};
-    bzero (&addr, sizeof (addr));
+    //bzero (&addr, sizeof (addr));
     //addr.sin_family = PF_INET;
     addr.sin_family = AF_INET;
     addr.sin_port = htons (port);
index 5de4db83effcc5c8c90acb7066421aba74059c2e..7a5090ab433ec3f24b699f175ac0af76b4a5157c 100644 (file)
@@ -134,6 +134,7 @@ int main (int argc, char *argv[])
         } else {
 
             // processing
+            VERBOSE (DEBUG, fprintf (stdout, "Received:\n%s\n", data));
 
             int rc = send_data (conn, data, len);
             if (rc == 0) {