Add debug functions.

This commit is contained in:
ng0
2019-08-14 10:04:29 +00:00
parent 316f6ab358
commit 93c00aaf05
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -2482,6 +2482,7 @@ internal_add_connection (struct MHD_Daemon *daemon,
errno = eno; errno = eno;
return MHD_NO; return MHD_NO;
} }
fprintf(stderr, "%lu\n", (unsigned long) daemon->pool_size);
connection->pool = MHD_pool_create (daemon->pool_size); connection->pool = MHD_pool_create (daemon->pool_size);
if (NULL == connection->pool) if (NULL == connection->pool)
{ {
@@ -5728,6 +5729,7 @@ MHD_start_daemon_va (unsigned int flags,
daemon->connections = 0; daemon->connections = 0;
daemon->connection_limit = MHD_MAX_CONNECTIONS_DEFAULT; daemon->connection_limit = MHD_MAX_CONNECTIONS_DEFAULT;
daemon->pool_size = MHD_POOL_SIZE_DEFAULT; daemon->pool_size = MHD_POOL_SIZE_DEFAULT;
fprintf(stderr, "%lu\n", (unsigned long) daemon->pool_size);
daemon->pool_increment = MHD_BUF_INC_SIZE; daemon->pool_increment = MHD_BUF_INC_SIZE;
daemon->unescape_callback = &unescape_wrapper; daemon->unescape_callback = &unescape_wrapper;
daemon->connection_timeout = 0; /* no timeout */ daemon->connection_timeout = 0; /* no timeout */
+3
View File
@@ -24,6 +24,7 @@
* @author Christian Grothoff * @author Christian Grothoff
* @author Karlson2k (Evgeny Grin) * @author Karlson2k (Evgeny Grin)
*/ */
#include <stdio.h>
#include "memorypool.h" #include "memorypool.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -177,6 +178,8 @@ MHD_pool_create (size_t max)
if (MAP_FAILED == pool->memory) if (MAP_FAILED == pool->memory)
{ {
alloc_size = ROUND_TO_ALIGN(max); alloc_size = ROUND_TO_ALIGN(max);
fprintf(stderr, "%lu\n", (unsigned long) alloc_size);
fprintf(stderr, "%lu\n", (unsigned long) max);
pool->memory = malloc (alloc_size); pool->memory = malloc (alloc_size);
if (NULL == pool->memory) if (NULL == pool->memory)
{ {