diff options
author | Gabor X Toth <*@tg-x.net> | 2016-09-23 14:26:55 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2016-09-23 14:26:55 +0000 |
commit | 451fd32170103921993d876d765a8755ce737a0b (patch) | |
tree | ad41cd960f7f8b0f80d9967332ffc0a85e9cb0c1 /src/psyc | |
parent | 3e872864741aaa83be947b614eafb4fef2c74253 (diff) | |
download | gnunet-451fd32170103921993d876d765a8755ce737a0b.tar.gz gnunet-451fd32170103921993d876d765a8755ce737a0b.zip |
multicast,psyc,social: remove core dependencny
Diffstat (limited to 'src/psyc')
-rw-r--r-- | src/psyc/Makefile.am | 1 | ||||
-rw-r--r-- | src/psyc/test_psyc.c | 32 |
2 files changed, 9 insertions, 24 deletions
diff --git a/src/psyc/Makefile.am b/src/psyc/Makefile.am index e00537e73..0016b1b3b 100644 --- a/src/psyc/Makefile.am +++ b/src/psyc/Makefile.am | |||
@@ -63,7 +63,6 @@ test_psyc_LDADD = \ | |||
63 | libgnunetpsyc.la \ | 63 | libgnunetpsyc.la \ |
64 | $(top_builddir)/src/psycutil/libgnunetpsycutil.la \ | 64 | $(top_builddir)/src/psycutil/libgnunetpsycutil.la \ |
65 | $(top_builddir)/src/testing/libgnunettesting.la \ | 65 | $(top_builddir)/src/testing/libgnunettesting.la \ |
66 | $(top_builddir)/src/core/libgnunetcore.la \ | ||
67 | $(top_builddir)/src/util/libgnunetutil.la | 66 | $(top_builddir)/src/util/libgnunetutil.la |
68 | 67 | ||
69 | EXTRA_DIST = \ | 68 | EXTRA_DIST = \ |
diff --git a/src/psyc/test_psyc.c b/src/psyc/test_psyc.c index d1846b8cc..03a1890b1 100644 --- a/src/psyc/test_psyc.c +++ b/src/psyc/test_psyc.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include "gnunet_testing_lib.h" | 34 | #include "gnunet_testing_lib.h" |
35 | #include "gnunet_psyc_util_lib.h" | 35 | #include "gnunet_psyc_util_lib.h" |
36 | #include "gnunet_psyc_service.h" | 36 | #include "gnunet_psyc_service.h" |
37 | #include "gnunet_core_service.h" | ||
38 | 37 | ||
39 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | 38 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
40 | 39 | ||
@@ -45,7 +44,6 @@ static int res; | |||
45 | 44 | ||
46 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 45 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
47 | 46 | ||
48 | static struct GNUNET_CORE_Handle *core; | ||
49 | static struct GNUNET_PeerIdentity this_peer; | 47 | static struct GNUNET_PeerIdentity this_peer; |
50 | 48 | ||
51 | /** | 49 | /** |
@@ -143,11 +141,6 @@ slave_parted (void *cls) | |||
143 | static void | 141 | static void |
144 | cleanup () | 142 | cleanup () |
145 | { | 143 | { |
146 | if (NULL != core) | ||
147 | { | ||
148 | GNUNET_CORE_disconnecT (core); | ||
149 | core = NULL; | ||
150 | } | ||
151 | if (NULL != slv) | 144 | if (NULL != slv) |
152 | { | 145 | { |
153 | GNUNET_PSYC_slave_part (slv, GNUNET_NO, &slave_parted, NULL); | 146 | GNUNET_PSYC_slave_part (slv, GNUNET_NO, &slave_parted, NULL); |
@@ -951,21 +944,6 @@ schedule_master_start (void *cls) | |||
951 | } | 944 | } |
952 | 945 | ||
953 | 946 | ||
954 | static void | ||
955 | core_connected (void *cls, const struct GNUNET_PeerIdentity *my_identity) | ||
956 | { | ||
957 | this_peer = *my_identity; | ||
958 | |||
959 | #if DEBUG_TEST_PSYC | ||
960 | master_start (); | ||
961 | #else | ||
962 | /* Allow some time for the services to initialize. */ | ||
963 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | ||
964 | &schedule_master_start, NULL); | ||
965 | #endif | ||
966 | |||
967 | } | ||
968 | |||
969 | /** | 947 | /** |
970 | * Main function of the test, run from scheduler. | 948 | * Main function of the test, run from scheduler. |
971 | * | 949 | * |
@@ -986,13 +964,21 @@ run (void *cls, | |||
986 | cfg = c; | 964 | cfg = c; |
987 | end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); | 965 | end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); |
988 | 966 | ||
967 | GNUNET_CRYPTO_get_peer_identity (cfg, &this_peer); | ||
968 | |||
989 | channel_key = GNUNET_CRYPTO_eddsa_key_create (); | 969 | channel_key = GNUNET_CRYPTO_eddsa_key_create (); |
990 | slave_key = GNUNET_CRYPTO_ecdsa_key_create (); | 970 | slave_key = GNUNET_CRYPTO_ecdsa_key_create (); |
991 | 971 | ||
992 | GNUNET_CRYPTO_eddsa_key_get_public (channel_key, &channel_pub_key); | 972 | GNUNET_CRYPTO_eddsa_key_get_public (channel_key, &channel_pub_key); |
993 | GNUNET_CRYPTO_ecdsa_key_get_public (slave_key, &slave_pub_key); | 973 | GNUNET_CRYPTO_ecdsa_key_get_public (slave_key, &slave_pub_key); |
994 | 974 | ||
995 | core = GNUNET_CORE_connecT (cfg, NULL, &core_connected, NULL, NULL, NULL); | 975 | #if DEBUG_TEST_PSYC |
976 | master_start (); | ||
977 | #else | ||
978 | /* Allow some time for the services to initialize. */ | ||
979 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | ||
980 | &schedule_master_start, NULL); | ||
981 | #endif | ||
996 | } | 982 | } |
997 | 983 | ||
998 | 984 | ||