diff options
Diffstat (limited to 'src/social/test_social.c')
-rw-r--r-- | src/social/test_social.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/src/social/test_social.c b/src/social/test_social.c index 4960b8820..0dc2a9d30 100644 --- a/src/social/test_social.c +++ b/src/social/test_social.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include "gnunet_testing_lib.h" | 32 | #include "gnunet_testing_lib.h" |
33 | #include "gnunet_psyc_util_lib.h" | 33 | #include "gnunet_psyc_util_lib.h" |
34 | #include "gnunet_social_service.h" | 34 | #include "gnunet_social_service.h" |
35 | #include "gnunet_core_service.h" | ||
36 | #include "gnunet_identity_service.h" | 35 | #include "gnunet_identity_service.h" |
37 | 36 | ||
38 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) | 37 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30) |
@@ -54,7 +53,6 @@ struct GNUNET_SCHEDULER_Task *end_badly_task; | |||
54 | 53 | ||
55 | const struct GNUNET_CONFIGURATION_Handle *cfg; | 54 | const struct GNUNET_CONFIGURATION_Handle *cfg; |
56 | 55 | ||
57 | struct GNUNET_CORE_Handle *core; | ||
58 | struct GNUNET_PeerIdentity this_peer; | 56 | struct GNUNET_PeerIdentity this_peer; |
59 | 57 | ||
60 | struct GNUNET_IDENTITY_Handle *id; | 58 | struct GNUNET_IDENTITY_Handle *id; |
@@ -185,12 +183,6 @@ host_announce2 (); | |||
185 | static void | 183 | static void |
186 | cleanup () | 184 | cleanup () |
187 | { | 185 | { |
188 | if (NULL != core) | ||
189 | { | ||
190 | GNUNET_CORE_disconnecT (core); | ||
191 | core = NULL; | ||
192 | } | ||
193 | |||
194 | if (NULL != id) | 186 | if (NULL != id) |
195 | { | 187 | { |
196 | GNUNET_IDENTITY_disconnect (id); | 188 | GNUNET_IDENTITY_disconnect (id); |
@@ -406,11 +398,6 @@ app_connected (void *cls) | |||
406 | { | 398 | { |
407 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 399 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
408 | "Test #%u: App connected: %p\n", test, cls); | 400 | "Test #%u: App connected: %p\n", test, cls); |
409 | if (NULL != core) | ||
410 | { | ||
411 | GNUNET_CORE_disconnecT (core); | ||
412 | core = NULL; | ||
413 | } | ||
414 | } | 401 | } |
415 | 402 | ||
416 | 403 | ||
@@ -1314,17 +1301,6 @@ identity_ego_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego, | |||
1314 | } | 1301 | } |
1315 | 1302 | ||
1316 | 1303 | ||
1317 | static void | ||
1318 | core_connected (void *cls, const struct GNUNET_PeerIdentity *my_identity) | ||
1319 | { | ||
1320 | this_peer = *my_identity; | ||
1321 | id = GNUNET_IDENTITY_connect (cfg, &identity_ego_cb, NULL); | ||
1322 | |||
1323 | test = TEST_HOST_CREATE; | ||
1324 | GNUNET_IDENTITY_create (id, host_name, &id_host_created, NULL); | ||
1325 | } | ||
1326 | |||
1327 | |||
1328 | /** | 1304 | /** |
1329 | * Main function of the test, run from scheduler. | 1305 | * Main function of the test, run from scheduler. |
1330 | * | 1306 | * |
@@ -1346,7 +1322,12 @@ run (void *cls, | |||
1346 | end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 1322 | end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
1347 | &end_badly, NULL); | 1323 | &end_badly, NULL); |
1348 | 1324 | ||
1349 | core = GNUNET_CORE_connecT (cfg, NULL, &core_connected, NULL, NULL, NULL); | 1325 | GNUNET_CRYPTO_get_peer_identity (cfg, &this_peer); |
1326 | |||
1327 | id = GNUNET_IDENTITY_connect (cfg, &identity_ego_cb, NULL); | ||
1328 | |||
1329 | test = TEST_HOST_CREATE; | ||
1330 | GNUNET_IDENTITY_create (id, host_name, &id_host_created, NULL); | ||
1350 | } | 1331 | } |
1351 | 1332 | ||
1352 | 1333 | ||