httpinfo: reduce memory usage
authorFerry Huberts <ferry.huberts@pelagic.nl>
Sat, 16 Apr 2016 19:33:04 +0000 (21:33 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Sat, 16 Apr 2016 20:29:20 +0000 (22:29 +0200)
Allocating 100KiB to start with is quite insane.
The generated pages will never be that large.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/httpinfo/src/olsrd_httpinfo.c

index b1be980..71a4951 100644 (file)
@@ -407,7 +407,7 @@ parse_http_request(int fd, void *data __attribute__ ((unused)), unsigned int fla
   }
 
   olsr_printf(1, "Request: %s\nfile: %s\nVersion: %s\n\n", req_type, filename, http_version);
   }
 
   olsr_printf(1, "Request: %s\nfile: %s\nVersion: %s\n\n", req_type, filename, http_version);
-  abuf_init(&body_abuf, 25 * AUTOBUFCHUNK);
+  abuf_init(&body_abuf, AUTOBUFCHUNK);
 
   if (!strcmp(req_type, "POST")) {
 #ifdef ADMIN_INTERFACE
 
   if (!strcmp(req_type, "POST")) {
 #ifdef ADMIN_INTERFACE