diff options
author | Gabor X Toth <*@tg-x.net> | 2013-09-16 16:05:58 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-09-16 16:05:58 +0000 |
commit | 6ea3d4aca0abfd35bfba6759c1655cbac057b68f (patch) | |
tree | 751b7da8be68b20cf6bbe03ec7540f9dd4cfc44b | |
parent | 31e0571c997c8adbeaff9d48550290d7e7379434 (diff) | |
download | gnunet-6ea3d4aca0abfd35bfba6759c1655cbac057b68f.tar.gz gnunet-6ea3d4aca0abfd35bfba6759c1655cbac057b68f.zip |
psyc service skeleton
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/Makefile.am | 11 | ||||
-rw-r--r-- | src/psycstore/gnunet-service-psycstore.c | 18 | ||||
-rw-r--r-- | src/psycstore/psycstore.h | 4 | ||||
-rw-r--r-- | src/psycstore/test_psycstore.c | 10 | ||||
-rw-r--r-- | src/psycstore/test_psycstore.conf | 3 |
6 files changed, 24 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac index 1c79f0bf5..9f4e56435 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1311,7 +1311,6 @@ src/gns/nss/Makefile | |||
1311 | src/hello/Makefile | 1311 | src/hello/Makefile |
1312 | src/identity/Makefile | 1312 | src/identity/Makefile |
1313 | src/identity/identity.conf | 1313 | src/identity/identity.conf |
1314 | src/psycstore/Makefile | ||
1315 | src/include/Makefile | 1314 | src/include/Makefile |
1316 | src/include/gnunet_directories.h | 1315 | src/include/gnunet_directories.h |
1317 | src/integration-tests/Makefile | 1316 | src/integration-tests/Makefile |
@@ -1332,6 +1331,9 @@ src/peerinfo/Makefile | |||
1332 | src/peerinfo/peerinfo.conf | 1331 | src/peerinfo/peerinfo.conf |
1333 | src/peerinfo-tool/Makefile | 1332 | src/peerinfo-tool/Makefile |
1334 | src/postgres/Makefile | 1333 | src/postgres/Makefile |
1334 | src/psyc/Makefile | ||
1335 | src/psyc/psyc.conf | ||
1336 | src/psycstore/Makefile | ||
1335 | src/psycstore/psycstore.conf | 1337 | src/psycstore/psycstore.conf |
1336 | src/pt/Makefile | 1338 | src/pt/Makefile |
1337 | src/regex/Makefile | 1339 | src/regex/Makefile |
diff --git a/src/Makefile.am b/src/Makefile.am index c2a64918f..1ef92db41 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -11,8 +11,13 @@ if HAVE_TESTING | |||
11 | endif | 11 | endif |
12 | 12 | ||
13 | if HAVE_EXPERIMENTAL | 13 | if HAVE_EXPERIMENTAL |
14 | EXP_DIR = dv multicast $(CONSENSUS) $(EXPERIMENTATION) | 14 | EXP_DIR = \ |
15 | #note: scalarproduct is not being listed here yet as the crypto is being reworked at the moment | 15 | dv \ |
16 | multicast \ | ||
17 | psyc \ | ||
18 | $(CONSENSUS) \ | ||
19 | $(EXPERIMENTATION) | ||
20 | # NOTE: scalarproduct is not being listed here yet as the crypto is being reworked at the moment | ||
16 | endif | 21 | endif |
17 | 22 | ||
18 | if HAVE_MYSQL | 23 | if HAVE_MYSQL |
@@ -23,7 +28,6 @@ if HAVE_POSTGRES | |||
23 | POSTGRES_DIR = postgres | 28 | POSTGRES_DIR = postgres |
24 | endif | 29 | endif |
25 | 30 | ||
26 | |||
27 | SUBDIRS = \ | 31 | SUBDIRS = \ |
28 | include $(INTLEMU_SUBDIRS) \ | 32 | include $(INTLEMU_SUBDIRS) \ |
29 | util \ | 33 | util \ |
@@ -67,4 +71,3 @@ SUBDIRS = \ | |||
67 | pt \ | 71 | pt \ |
68 | integration-tests \ | 72 | integration-tests \ |
69 | $(EXP_DIR) | 73 | $(EXP_DIR) |
70 | |||
diff --git a/src/psycstore/gnunet-service-psycstore.c b/src/psycstore/gnunet-service-psycstore.c index 8a21167e1..14945641f 100644 --- a/src/psycstore/gnunet-service-psycstore.c +++ b/src/psycstore/gnunet-service-psycstore.c | |||
@@ -23,11 +23,8 @@ | |||
23 | * @brief PSYCstore service | 23 | * @brief PSYCstore service |
24 | * @author Gabor X Toth | 24 | * @author Gabor X Toth |
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | * | ||
27 | * The purpose of this service is to manage private keys that | ||
28 | * represent the various egos/pseudonyms/identities of a GNUnet user. | ||
29 | * | ||
30 | */ | 26 | */ |
27 | |||
31 | #include "platform.h" | 28 | #include "platform.h" |
32 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
33 | #include "gnunet_constants.h" | 30 | #include "gnunet_constants.h" |
@@ -666,15 +663,14 @@ handle_state_get_prefix (void *cls, | |||
666 | 663 | ||
667 | 664 | ||
668 | /** | 665 | /** |
669 | * Handle PSYCstore clients. | 666 | * Initialize the PSYCstore service. |
670 | * | 667 | * |
671 | * @param cls closure | 668 | * @param cls Closure. |
672 | * @param server the initialized server | 669 | * @param server The initialized server. |
673 | * @param c configuration to use | 670 | * @param c Configuration to use. |
674 | */ | 671 | */ |
675 | static void | 672 | static void |
676 | run (void *cls, | 673 | run (void *cls, struct GNUNET_SERVER_Handle *server, |
677 | struct GNUNET_SERVER_Handle *server, | ||
678 | const struct GNUNET_CONFIGURATION_Handle *c) | 674 | const struct GNUNET_CONFIGURATION_Handle *c) |
679 | { | 675 | { |
680 | static const struct GNUNET_SERVER_MessageHandler handlers[] = { | 676 | static const struct GNUNET_SERVER_MessageHandler handlers[] = { |
@@ -766,7 +762,7 @@ run (void *cls, | |||
766 | 762 | ||
767 | 763 | ||
768 | /** | 764 | /** |
769 | * The main function for the network size estimation service. | 765 | * The main function for the service. |
770 | * | 766 | * |
771 | * @param argc number of arguments from the command line | 767 | * @param argc number of arguments from the command line |
772 | * @param argv command line arguments | 768 | * @param argv command line arguments |
diff --git a/src/psycstore/psycstore.h b/src/psycstore/psycstore.h index 3a7a9feed..cc382a456 100644 --- a/src/psycstore/psycstore.h +++ b/src/psycstore/psycstore.h | |||
@@ -24,8 +24,8 @@ | |||
24 | * @author Gabor X Toth | 24 | * @author Gabor X Toth |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #ifndef PSYCSTORE_H | 27 | #ifndef GNUNET_PSYCSTORE_H |
28 | #define PSYCSTORE_H | 28 | #define GNUNET_PSYCSTORE_H |
29 | 29 | ||
30 | #include "gnunet_common.h" | 30 | #include "gnunet_common.h" |
31 | 31 | ||
diff --git a/src/psycstore/test_psycstore.c b/src/psycstore/test_psycstore.c index 15eb2de30..cfda6819e 100644 --- a/src/psycstore/test_psycstore.c +++ b/src/psycstore/test_psycstore.c | |||
@@ -500,13 +500,13 @@ static void | |||
500 | run (void *cls, char *const *args, const char *cfgfile, | 500 | run (void *cls, char *const *args, const char *cfgfile, |
501 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 501 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
502 | #else | 502 | #else |
503 | run (void *cls, | 503 | run (void *cls, |
504 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 504 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
505 | struct GNUNET_TESTING_Peer *peer) | 505 | struct GNUNET_TESTING_Peer *peer) |
506 | #endif | 506 | #endif |
507 | { | 507 | { |
508 | end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 508 | end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
509 | &end_badly, NULL); | 509 | |
510 | h = GNUNET_PSYCSTORE_connect (cfg); | 510 | h = GNUNET_PSYCSTORE_connect (cfg); |
511 | GNUNET_assert (NULL != h); | 511 | GNUNET_assert (NULL != h); |
512 | 512 | ||
diff --git a/src/psycstore/test_psycstore.conf b/src/psycstore/test_psycstore.conf index 4c52d1ce0..a7d334617 100644 --- a/src/psycstore/test_psycstore.conf +++ b/src/psycstore/test_psycstore.conf | |||
@@ -1,7 +1,6 @@ | |||
1 | [arm] | 1 | [arm] |
2 | UNIXPATH = /tmp/test-gnunet-service-arm.sock | 2 | UNIXPATH = /tmp/test-gnunet-service-arm.sock |
3 | DEFAULTSERVICES = psycstore | 3 | DEFAULTSERVICES = psycstore |
4 | GLOBAL_POSTFIX = -L DEBUG | ||
5 | 4 | ||
6 | [psycstore] | 5 | [psycstore] |
7 | AUTOSTART = YES | 6 | AUTOSTART = YES |
@@ -11,8 +10,6 @@ UNIXPATH = /tmp/test-gnunet-service-psycstore.sock | |||
11 | UNIX_MATCH_UID = NO | 10 | UNIX_MATCH_UID = NO |
12 | UNIX_MATCH_GID = YES | 11 | UNIX_MATCH_GID = YES |
13 | DATABASE = sqlite | 12 | DATABASE = sqlite |
14 | OPTIONS = -L DEBUG | ||
15 | DEBUG = YES | ||
16 | 13 | ||
17 | [psycstore-sqlite] | 14 | [psycstore-sqlite] |
18 | FILENAME = $SERVICEHOME/psycstore/sqlite_test.db | 15 | FILENAME = $SERVICEHOME/psycstore/sqlite_test.db |