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/multicast/test_multicast.c | |
parent | 3e872864741aaa83be947b614eafb4fef2c74253 (diff) | |
download | gnunet-451fd32170103921993d876d765a8755ce737a0b.tar.gz gnunet-451fd32170103921993d876d765a8755ce737a0b.zip |
multicast,psyc,social: remove core dependencny
Diffstat (limited to 'src/multicast/test_multicast.c')
-rw-r--r-- | src/multicast/test_multicast.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/multicast/test_multicast.c b/src/multicast/test_multicast.c index 44c62f677..1e3a4922b 100644 --- a/src/multicast/test_multicast.c +++ b/src/multicast/test_multicast.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include "gnunet_common.h" | 31 | #include "gnunet_common.h" |
32 | #include "gnunet_util_lib.h" | 32 | #include "gnunet_util_lib.h" |
33 | #include "gnunet_testing_lib.h" | 33 | #include "gnunet_testing_lib.h" |
34 | #include "gnunet_core_service.h" | ||
35 | #include "gnunet_multicast_service.h" | 34 | #include "gnunet_multicast_service.h" |
36 | 35 | ||
37 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | 36 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
@@ -48,7 +47,6 @@ static struct GNUNET_SCHEDULER_Task * end_badly_task; | |||
48 | 47 | ||
49 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 48 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
50 | 49 | ||
51 | struct GNUNET_CORE_Handle *core; | ||
52 | struct GNUNET_PeerIdentity this_peer; | 50 | struct GNUNET_PeerIdentity this_peer; |
53 | 51 | ||
54 | struct GNUNET_MULTICAST_Origin *origin; | 52 | struct GNUNET_MULTICAST_Origin *origin; |
@@ -110,11 +108,6 @@ member_join (int t); | |||
110 | static void | 108 | static void |
111 | cleanup () | 109 | cleanup () |
112 | { | 110 | { |
113 | if (NULL != core) | ||
114 | { | ||
115 | GNUNET_CORE_disconnecT (core); | ||
116 | core = NULL; | ||
117 | } | ||
118 | if (NULL != member) | 111 | if (NULL != member) |
119 | { | 112 | { |
120 | GNUNET_MULTICAST_member_part (member, NULL, NULL); | 113 | GNUNET_MULTICAST_member_part (member, NULL, NULL); |
@@ -705,16 +698,6 @@ origin_start () | |||
705 | } | 698 | } |
706 | 699 | ||
707 | 700 | ||
708 | static void | ||
709 | core_connected (void *cls, const struct GNUNET_PeerIdentity *my_identity) | ||
710 | { | ||
711 | this_peer = *my_identity; | ||
712 | |||
713 | // Test 1 starts here | ||
714 | origin_start (); | ||
715 | } | ||
716 | |||
717 | |||
718 | /** | 701 | /** |
719 | * Main function of the test, run from scheduler. | 702 | * Main function of the test, run from scheduler. |
720 | * | 703 | * |
@@ -737,8 +720,10 @@ run (void *cls, | |||
737 | cfg = c; | 720 | cfg = c; |
738 | end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 721 | end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
739 | &end_badly, NULL); | 722 | &end_badly, NULL); |
740 | core = GNUNET_CORE_connecT (cfg, NULL, | 723 | GNUNET_CRYPTO_get_peer_identity (cfg, &this_peer); |
741 | &core_connected, NULL, NULL, NULL); | 724 | |
725 | // Test 1 starts here | ||
726 | origin_start (); | ||
742 | } | 727 | } |
743 | 728 | ||
744 | 729 | ||