[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9760 - GNUnet/src/applications/hostlist
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9760 - GNUnet/src/applications/hostlist |
Date: |
Tue, 15 Dec 2009 11:52:16 +0100 |
Author: grothoff
Date: 2009-12-15 11:52:16 +0100 (Tue, 15 Dec 2009)
New Revision: 9760
Modified:
GNUnet/src/applications/hostlist/hostlist.c
GNUnet/src/applications/hostlist/nat-peer.conf
GNUnet/src/applications/hostlist/tcp-peer.conf
Log:
better start both v6 and v4 MHD
Modified: GNUnet/src/applications/hostlist/hostlist.c
===================================================================
--- GNUnet/src/applications/hostlist/hostlist.c 2009-12-15 10:32:07 UTC (rev
9759)
+++ GNUnet/src/applications/hostlist/hostlist.c 2009-12-15 10:52:16 UTC (rev
9760)
@@ -34,6 +34,8 @@
static struct MHD_Daemon *daemon_handle;
+static struct MHD_Daemon *daemon_handle6;
+
static GNUNET_CoreAPIForPlugins *coreAPI;
static GNUNET_Identity_ServiceAPI *identity;
@@ -168,7 +170,7 @@
stat_bytes_returned
= stats->create (gettext_noop ("# hostlist bytes returned"));
}
- daemon_handle = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_IPv6,
+ daemon_handle6 = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY | MHD_USE_IPv6,
(unsigned short) port,
&accept_policy_callback,
NULL,
@@ -179,7 +181,19 @@
MHD_OPTION_CONNECTION_TIMEOUT, 16,
MHD_OPTION_CONNECTION_MEMORY_LIMIT,
(size_t) 16 * 1024, MHD_OPTION_END);
- if (daemon_handle == NULL)
+ daemon_handle = MHD_start_daemon (MHD_USE_SELECT_INTERNALLY,
+ (unsigned short) port,
+ &accept_policy_callback,
+ NULL,
+ &access_handler_callback,
+ NULL,
+ MHD_OPTION_CONNECTION_LIMIT, 16,
+ MHD_OPTION_PER_IP_CONNECTION_LIMIT, 1,
+ MHD_OPTION_CONNECTION_TIMEOUT, 16,
+ MHD_OPTION_CONNECTION_MEMORY_LIMIT,
+ (size_t) 16 * 1024, MHD_OPTION_END);
+ if ( (daemon_handle == NULL) &&
+ (daemon_handle6 == NULL) )
{
if (stats != NULL)
{
@@ -190,6 +204,8 @@
identity = NULL;
return GNUNET_SYSERR;
}
+ fprintf (stderr, "hostlist running on port %u\n", (unsigned int) port);
+
GNUNET_GE_ASSERT (capi->ectx,
0 == GNUNET_GC_set_configuration_value_string (capi->cfg,
capi->ectx,
@@ -203,8 +219,16 @@
void
done_module_hostlist ()
{
- MHD_stop_daemon (daemon_handle);
- daemon_handle = NULL;
+ if (daemon_handle != NULL)
+ {
+ MHD_stop_daemon (daemon_handle);
+ daemon_handle = NULL;
+ }
+ if (daemon_handle6 != NULL)
+ {
+ MHD_stop_daemon (daemon_handle6);
+ daemon_handle6 = NULL;
+ }
if (stats != NULL)
{
coreAPI->service_release (stats);
Modified: GNUnet/src/applications/hostlist/nat-peer.conf
===================================================================
--- GNUnet/src/applications/hostlist/nat-peer.conf 2009-12-15 10:32:07 UTC
(rev 9759)
+++ GNUnet/src/applications/hostlist/nat-peer.conf 2009-12-15 10:52:16 UTC
(rev 9760)
@@ -15,7 +15,7 @@
[LOGGING]
USER-LEVEL = ERROR
ADMIN-LEVEL = ERROR
-DEVELOPER = NO
+DEVELOPER = YES
[MODULES]
sqstore = "sqstore_sqlite"
Modified: GNUnet/src/applications/hostlist/tcp-peer.conf
===================================================================
--- GNUnet/src/applications/hostlist/tcp-peer.conf 2009-12-15 10:32:07 UTC
(rev 9759)
+++ GNUnet/src/applications/hostlist/tcp-peer.conf 2009-12-15 10:52:16 UTC
(rev 9760)
@@ -14,7 +14,7 @@
[LOGGING]
USER-LEVEL = ERROR
ADMIN-LEVEL = ERROR
-DEVELOPER = NO
+DEVELOPER = YES
[MODULES]
sqstore = "sqstore_sqlite"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9760 - GNUnet/src/applications/hostlist,
gnunet <=