view Resources/mongoose-patch.diff @ 0:3959d33612cc

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 19 Jul 2012 14:32:22 +0200
parents
children e2d68529605f
line wrap: on
line source

--- mongoose/mongoose.c	2012-03-11 23:41:35.000000000 +0100
+++ mongoose.c	2012-06-22 13:44:40.093202063 +0200
@@ -3844,10 +3844,8 @@
 }
 
 static void discard_current_request_from_buffer(struct mg_connection *conn) {
-  char *buffered;
   int buffered_len, body_len;
 
-  buffered = conn->buf + conn->request_len;
   buffered_len = conn->data_len - conn->request_len;
   assert(buffered_len >= 0);
 
@@ -4148,7 +4146,13 @@
 
   // Wait until mg_fini() stops
   while (ctx->stop_flag != 2) {
-    (void) sleep(0);
+#if defined(__linux)
+    usleep(100000);
+#elif defined(_WIN32)
+    Sleep(100);
+#else
+#error Support your platform here
+#endif
   }
   free_context(ctx);