From 8130491b698c5e7972c46072476f4cf0af94e82b Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Tue, 12 Jun 2012 18:52:34 +0000 Subject: [PATCH] -make CA info better, connection limit mhd --- src/gns/gnunet-gns-proxy-setup-ca | 2 +- src/gns/gnunet-gns-proxy.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/gns/gnunet-gns-proxy-setup-ca b/src/gns/gnunet-gns-proxy-setup-ca index 507123594..48fae94f7 100644 --- a/src/gns/gnunet-gns-proxy-setup-ca +++ b/src/gns/gnunet-gns-proxy-setup-ca @@ -1,6 +1,6 @@ echo "Generating CA" -openssl req -new -x509 -days 3650 -extensions v3_ca -keyout gnscakey.pem -out gnscacert.pem -subj "/C=DE/ST=Bavaria/L=Munich/O=TUM/OU=IN/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNUnet Naming System" +openssl req -new -x509 -days 3650 -extensions v3_ca -keyout gnscakey.pem -out gnscacert.pem -subj "/C=DE/ST=Bavaria/L=Munich/O=GNUnet Naming System/OU=GNUnet/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNUnet Naming System" echo "Removing passphrase from key" openssl rsa -passin pass:"GNUnet Naming System" -in gnscakey.pem -out gnscakeynoenc.pem diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index c99010dc4..4effc0f04 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -35,7 +35,7 @@ #include #define GNUNET_GNS_PROXY_PORT 7777 -#define MAX_MHD_CONNECTIONS 300 +#define MHD_MAX_CONNECTIONS 300 /* MHD/cURL defines */ #define BUF_WAIT_FOR_CURL 0 @@ -1796,10 +1796,8 @@ accept_cb (void* cls, const struct sockaddr *addr, socklen_t addrlen) return MHD_NO; } - if (total_mhd_connections >= MAX_MHD_CONNECTIONS) - return MHD_NO; - - total_mhd_connections++; + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Connection accepted\n"); return MHD_YES; } @@ -1846,7 +1844,7 @@ add_handle_to_ssl_mhd (struct GNUNET_NETWORK_Handle *h, char* domain) &accept_cb, NULL, &create_response, hd, MHD_OPTION_LISTEN_SOCKET, GNUNET_NETWORK_get_fd (mhd_unix_socket), - MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 128, + MHD_OPTION_CONNECTION_LIMIT, MHD_MAX_CONNECTIONS, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 16, MHD_OPTION_NOTIFY_COMPLETED, NULL, NULL, @@ -2598,7 +2596,7 @@ run (void *cls, char *const *args, const char *cfgfile, &accept_cb, NULL, &create_response, hd, MHD_OPTION_LISTEN_SOCKET, GNUNET_NETWORK_get_fd (mhd_unix_socket), - MHD_OPTION_CONNECTION_LIMIT, (unsigned int) 128, + MHD_OPTION_CONNECTION_LIMIT, MHD_MAX_CONNECTIONS, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 16, MHD_OPTION_NOTIFY_COMPLETED, NULL, NULL, -- 2.25.1