backbone server is ready
authorMazet Laurent <mazet@softndesign.org>
Thu, 18 May 2023 13:35:42 +0000 (15:35 +0200)
committerMazet Laurent <mazet@softndesign.org>
Thu, 18 May 2023 13:35:42 +0000 (15:35 +0200)
server.h
webserver.c

index 679ef462bb44b548d76a0bb9b2ebddb33b6995ef..9e9f7254b7c8e0515915bc435bad1a6bb1de75d7 100644 (file)
--- a/server.h
+++ b/server.h
@@ -23,5 +23,3 @@ int send_data (socket_t sock, unsigned char *data, int len);
 #endif /* __SERVER_H__ */
 
 /* vim: set ts=4 sw=4 et: */
-
-/* vim: set ts=4 sw=4 et: */
index b0b7aeb44dc6e46ace5c7d609d68b09afd95219c..0110f279d315e5ce455634a33778a8f7327ceb98 100644 (file)
@@ -1,6 +1,6 @@
 /* depend: */
 /* cflags: */
-/* linker: color.o debug.o server.o signal.o */
+/* linker: color.o debug.o http.o server.o signal.o */
 
 #include <assert.h>
 #include <stdio.h>
@@ -9,6 +9,7 @@
 #include <signal.h>
 
 #include "debug.h"
+#include "http.h"
 #include "server.h"
 #include "signal.h"
 
@@ -135,9 +136,11 @@ int main (int argc, char *argv[])
         } else if (len < 0) {
             VERBOSE (WARNING, PRINT ("Connection in error (rx)\n"));
         } else {
+            VERBOSE (DEBUG, PRINT ("Received %d bytes\n", len));
 
             // processing
-            VERBOSE (DEBUG, PRINT ("Received:\n%s\n", data));
+            VERBOSE (DEBUG, PRINT ("Processing %s\n", data));
+            len = processing (data, len, &data);
 
             int rc = send_data (conn, data, len);
             if (rc == 0) {