[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11312 - in gnunet: contrib src/arm src/hostlist src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11312 - in gnunet: contrib src/arm src/hostlist src/util |
Date: |
Tue, 11 May 2010 15:43:44 +0200 |
Author: grothoff
Date: 2010-05-11 15:43:44 +0200 (Tue, 11 May 2010)
New Revision: 11312
Modified:
gnunet/contrib/defaults.conf
gnunet/src/arm/gnunet-service-manager.c
gnunet/src/hostlist/test_gnunet_daemon_hostlist.c
gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf
gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf
gnunet/src/util/service.c
gnunet/src/util/test_service.c
gnunet/src/util/test_service_data.conf
Log:
fixes
Modified: gnunet/contrib/defaults.conf
===================================================================
--- gnunet/contrib/defaults.conf 2010-05-11 13:31:41 UTC (rev 11311)
+++ gnunet/contrib/defaults.conf 2010-05-11 13:43:44 UTC (rev 11312)
@@ -18,7 +18,6 @@
[transport-tcp]
PORT = 2086
TIMEOUT = 300000
-ALLOW_SHUTDOWN = NO
# MAXBUF =
# DISABLEV6 =
# BINDTO =
@@ -36,7 +35,6 @@
BINARY = gnunet-service-arm
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
DEFAULTSERVICES = resolver transport core topology hostlist
# GLOBAL_POSTFIX = -l $SERVICEHOME/{}-logs
# GLOBAL_PREFIX =
@@ -50,6 +48,7 @@
# PREFIX =
[statistics]
+AUTOSTART = YES
PORT = 2088
HOSTNAME = localhost
HOME = $SERVICEHOME
@@ -57,7 +56,6 @@
BINARY = gnunet-service-statistics
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# USERNAME =
# MAXBUF =
# TIMEOUT =
@@ -68,6 +66,7 @@
# PREFIX =
[resolver]
+AUTOSTART = YES
PORT = 2089
HOSTNAME = localhost
HOME = $SERVICEHOME
@@ -75,7 +74,6 @@
BINARY = gnunet-service-resolver
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# USERNAME =
# MAXBUF =
# TIMEOUT =
@@ -86,6 +84,7 @@
# PREFIX =
[peerinfo]
+AUTOSTART = YES
PORT = 2090
HOSTNAME = localhost
HOME = $SERVICEHOME
@@ -93,7 +92,6 @@
BINARY = gnunet-service-peerinfo
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# USERNAME =
# MAXBUF =
# TIMEOUT =
@@ -107,6 +105,7 @@
[transport]
+AUTOSTART = YES
PORT = 2091
HOSTNAME = localhost
HOME = $SERVICEHOME
@@ -115,7 +114,6 @@
NEIGHBOUR_LIMIT = 50
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
PLUGINS = tcp
# USERNAME =
# MAXBUF =
@@ -127,6 +125,7 @@
# PREFIX =
[core]
+AUTOSTART = YES
PORT = 2092
HOSTNAME = localhost
HOME = $SERVICEHOME
@@ -134,7 +133,6 @@
BINARY = gnunet-service-core
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# quotas are in bytes per second now!
TOTAL_QUOTA_IN = 65536
TOTAL_QUOTA_OUT = 65536
@@ -173,6 +171,7 @@
[datastore]
+AUTOSTART = YES
PORT = 2093
HOSTNAME = localhost
HOME = $SERVICEHOME
@@ -180,7 +179,6 @@
BINARY = gnunet-service-datastore
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
QUOTA = 100000000
BLOOMFILTER = $SERVICEHOME/fs/bloomfilter
DATABASE = sqlite
@@ -189,6 +187,7 @@
FILENAME = $SERVICEHOME/datastore/sqlite.db
[fs]
+AUTOSTART = YES
INDEXDB = $SERVICEHOME/idxinfo.lst
IDENTITY_DIR = $SERVICEHOME/identities/
STATE_DIR = $SERVICEHOME/persistence/
@@ -199,6 +198,5 @@
BINARY = gnunet-service-fs
ACCEPT_FROM = 127.0.0.1;
ACCEPT_FROM6 = ::1;
-ALLOW_SHUTDOWN = YES
# DEBUG = YES
Modified: gnunet/src/arm/gnunet-service-manager.c
===================================================================
--- gnunet/src/arm/gnunet-service-manager.c 2010-05-11 13:31:41 UTC (rev
11311)
+++ gnunet/src/arm/gnunet-service-manager.c 2010-05-11 13:43:44 UTC (rev
11312)
@@ -730,7 +730,8 @@
unsigned int i;
if ( (strcasecmp (section, "arm") == 0) ||
- (strcasecmp (option, "PORT") != 0) ||
+ (strcasecmp (option, "AUTOSTART") != 0) ||
+ (strcasecmp (value, "YES") != 0) ||
(isInDefaultList (section) == GNUNET_YES) )
return;
if (0 >= (ret = GNUNET_SERVICE_get_server_addresses (section, cfg, &addrs,
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist.c 2010-05-11 13:31:41 UTC
(rev 11311)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist.c 2010-05-11 13:43:44 UTC
(rev 11312)
@@ -48,7 +48,6 @@
struct GNUNET_CONFIGURATION_Handle *cfg;
struct GNUNET_TRANSPORT_Handle *th;
struct GNUNET_MessageHeader *hello;
- struct GNUNET_ARM_Handle *arm;
#if START_ARM
pid_t arm_pid;
#endif
@@ -145,7 +144,6 @@
"-c", cfgname, NULL);
#endif
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
- GNUNET_ARM_start_services (p->cfg, sched, "core", NULL);
p->th = GNUNET_TRANSPORT_connect (sched, p->cfg, p, NULL,
¬ify_connect, NULL);
GNUNET_assert (p->th != NULL);
@@ -174,35 +172,16 @@
static void
-stop_cb (void *cls,
- int success)
+stop_arm (struct PeerContext *p)
{
- struct PeerContext *p = cls;
-
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- success
- ? "ARM stopped core service\n"
- : "ARM failed to stop core service\n");
- GNUNET_ARM_disconnect (p->arm);
- p->arm = NULL;
- /* make sure this runs after all other tasks are done */
+ "Asking ARM to stop core service\n");
GNUNET_SCHEDULER_add_delayed (sched,
GNUNET_TIME_UNIT_SECONDS,
&waitpid_task, p);
}
-static void
-stop_arm (struct PeerContext *p)
-{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Asking ARM to stop core service\n");
- p->arm = GNUNET_ARM_connect (p->cfg, sched, NULL);
- GNUNET_ARM_stop_service (p->arm, "core", GNUNET_TIME_UNIT_SECONDS,
- &stop_cb, p);
-}
-
-
/**
* Try again to connect to transport service.
*/
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf 2010-05-11
13:31:41 UTC (rev 11311)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer1.conf 2010-05-11
13:43:44 UTC (rev 11312)
@@ -13,7 +13,7 @@
[arm]
PORT = 12966
-DEFAULTSERVICES = resolver transport core statistics topology
+DEFAULTSERVICES = hostlist topology
#GLOBAL_PREFIX = xterm -e gdb -x cmd --args
[statistics]
@@ -47,4 +47,10 @@
[topology]
#DEBUG = YES
#PREFIX = valgrind --tool=memcheck
-DEBUG = NO
\ No newline at end of file
+DEBUG = NO
+
+[fs]
+AUTOSTART = NO
+
+[datastore]
+AUTOSTART = NO[fs]
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf 2010-05-11
13:31:41 UTC (rev 11311)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_peer2.conf 2010-05-11
13:43:44 UTC (rev 11312)
@@ -13,7 +13,7 @@
[arm]
PORT = 22966
-DEFAULTSERVICES = resolver transport core statistics topology
+DEFAULTSERVICES = hostlist topology
#GLOBAL_PREFIX = xterm -e gdb -x cmd --args
DEBUG = NO
@@ -47,3 +47,9 @@
#DEBUG = YES
#PREFIX = valgrind --tool=memcheck
DEBUG = NO
+
+[fs]
+AUTOSTART = NO
+
+[datastore]
+AUTOSTART = NO
\ No newline at end of file
Modified: gnunet/src/util/service.c
===================================================================
--- gnunet/src/util/service.c 2010-05-11 13:31:41 UTC (rev 11311)
+++ gnunet/src/util/service.c 2010-05-11 13:43:44 UTC (rev 11312)
@@ -511,11 +511,6 @@
int require_found;
/**
- * Can clients ask us to initiate a shutdown?
- */
- int allow_shutdown;
-
- /**
* Our options.
*/
enum GNUNET_SERVICE_Options options;
@@ -944,7 +939,6 @@
* - TIMEOUT (after how many ms does an inactive service timeout);
* - MAXBUF (maximum incoming message size supported)
* - DISABLEV6 (disable support for IPv6, otherwise we use dual-stack)
- * - ALLOW_SHUTDOWN (allow clients to shutdown this service)
* - BINDTO (hostname or IP address to bind to, otherwise we take everything)
* - ACCEPT_FROM (only allow connections from specified IPv4 subnets)
* - ACCEPT_FROM6 (only allow connections from specified IPv6 subnets)
@@ -995,25 +989,7 @@
}
else
maxbuf = GNUNET_SERVER_MAX_MESSAGE_SIZE;
- if (GNUNET_CONFIGURATION_have_value (sctx->cfg,
- sctx->serviceName, "ALLOW_SHUTDOWN"))
- {
- if (GNUNET_SYSERR ==
- (sctx->allow_shutdown =
- GNUNET_CONFIGURATION_get_value_yesno (sctx->cfg, sctx->serviceName,
- "ALLOW_SHUTDOWN")))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("Specified value for `%s' of service `%s' is
invalid\n"),
- "ALLOW_SHUTDOWN",
- sctx->serviceName);
- return GNUNET_SYSERR;
- }
- }
- else
- sctx->allow_shutdown = GNUNET_NO;
-
if (GNUNET_CONFIGURATION_have_value (sctx->cfg,
sctx->serviceName, "TOLERANT"))
{
Modified: gnunet/src/util/test_service.c
===================================================================
--- gnunet/src/util/test_service.c 2010-05-11 13:31:41 UTC (rev 11311)
+++ gnunet/src/util/test_service.c 2010-05-11 13:43:44 UTC (rev 11312)
@@ -206,39 +206,7 @@
}
-/**
- * Main method, starts scheduler with task1,
- * checks that "ok" is correct at the end.
- */
-static int
-check6d ()
-{
- ok = 1;
- char *const argv[] = {
- "test_service6",
- "-c",
- "test_service_data.conf",
- "-L",
-#if VERBOSE
- "DEBUG",
-#else
- "WARNING",
-#endif
- "-d",
- NULL
- };
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting V6 as daemon\n");
- GNUNET_assert (GNUNET_OK ==
- GNUNET_SERVICE_run (6,
- argv,
- "test_service6",
- GNUNET_SERVICE_OPTION_NONE,
- &runner6, &ok));
- GNUNET_break (0 == ok);
- return ok;
-}
-
static void
start_stop_main (void *cls,
struct GNUNET_SCHEDULER_Handle *sched,
@@ -322,7 +290,6 @@
{
GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (s));
ret += check6 ();
- ret += check6d (); /* with daemonization */
}
ret += check_start_stop ();
Modified: gnunet/src/util/test_service_data.conf
===================================================================
--- gnunet/src/util/test_service_data.conf 2010-05-11 13:31:41 UTC (rev
11311)
+++ gnunet/src/util/test_service_data.conf 2010-05-11 13:43:44 UTC (rev
11312)
@@ -10,7 +10,6 @@
ACCEPT_FROM6=::1;
REJECT_FROM6=AB:CD:EF::00;AB:CD::00/40;
HOSTNAME=localhost
-ALLOW_SHUTDOWN=YES
[test_service6]
PORT=12435
@@ -23,7 +22,6 @@
ACCEPT_FROM6=::1;
REJECT_FROM6=AB:CD:EF::00;AB:CD::00/40;
HOSTNAME=::1
-ALLOW_SHUTDOWN=YES
[resolver]
HOSTNAME=localhost
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11312 - in gnunet: contrib src/arm src/hostlist src/util,
gnunet <=