aboutsummaryrefslogtreecommitdiff
path: root/src/social/test_social.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/social/test_social.c')
-rw-r--r--src/social/test_social.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/social/test_social.c b/src/social/test_social.c
index 5eeb20196..e2639f4d6 100644
--- a/src/social/test_social.c
+++ b/src/social/test_social.c
@@ -267,16 +267,17 @@ end ()
267 GNUNET_SCHEDULER_cancel (end_badly_task); 267 GNUNET_SCHEDULER_cancel (end_badly_task);
268 end_badly_task = NULL; 268 end_badly_task = NULL;
269 } 269 }
270 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS, 270 GNUNET_SCHEDULER_add_now (&end_normally, NULL);
271 &end_normally, NULL);
272} 271}
273 272
274 273
275static void 274static void
276transmit_resume (void *cls) 275transmit_resume (void *cls)
277{ 276{
278 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmission resumed.\n");
279 struct TransmitClosure *tmit = cls; 277 struct TransmitClosure *tmit = cls;
278
279 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
280 "Transmission resumed.\n");
280 if (NULL != tmit->host_ann) 281 if (NULL != tmit->host_ann)
281 GNUNET_SOCIAL_host_announce_resume (tmit->host_ann); 282 GNUNET_SOCIAL_host_announce_resume (tmit->host_ann);
282 else 283 else
@@ -357,14 +358,14 @@ host_farewell2 (void *cls,
357{ 358{
358 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 359 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
359 "Nym left the place again.\n"); 360 "Nym left the place again.\n");
360 GNUNET_SCHEDULER_add_now (schedule_host_leave, NULL); 361 GNUNET_SCHEDULER_add_now (&schedule_host_leave, NULL);
361} 362}
362 363
363 364
364static void 365static void
365host_reconnected (void *cls, int result, 366host_reconnected (void *cls, int result,
366 const struct GNUNET_CRYPTO_EddsaPublicKey *home_pub_key, 367 const struct GNUNET_CRYPTO_EddsaPublicKey *home_pub_key,
367 uint64_t max_message_id) 368 uint64_t max_message_id)
368{ 369{
369 place_pub_key = *home_pub_key; 370 place_pub_key = *home_pub_key;
370 GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash); 371 GNUNET_CRYPTO_hash (&place_pub_key, sizeof (place_pub_key), &place_pub_hash);
@@ -375,7 +376,7 @@ host_reconnected (void *cls, int result,
375 is_host_reconnected = GNUNET_YES; 376 is_host_reconnected = GNUNET_YES;
376 if (GNUNET_YES == is_guest_reconnected) 377 if (GNUNET_YES == is_guest_reconnected)
377 { 378 {
378 GNUNET_SCHEDULER_add_now (schedule_guest_leave, NULL); 379 GNUNET_SCHEDULER_add_now (&schedule_guest_leave, NULL);
379 } 380 }
380} 381}
381 382
@@ -393,7 +394,7 @@ guest_reconnected (void *cls, int result,
393 is_guest_reconnected = GNUNET_YES; 394 is_guest_reconnected = GNUNET_YES;
394 if (GNUNET_YES == is_host_reconnected) 395 if (GNUNET_YES == is_host_reconnected)
395 { 396 {
396 GNUNET_SCHEDULER_add_now (schedule_guest_leave, NULL); 397 GNUNET_SCHEDULER_add_now (&schedule_guest_leave, NULL);
397 } 398 }
398} 399}
399 400
@@ -583,8 +584,10 @@ schedule_guest_leave (void *cls)
583 584
584 585
585static void 586static void
586guest_look_for_result (void *cls, int64_t result_code, 587guest_look_for_result (void *cls,
587 const void *data, uint16_t data_size) 588 int64_t result_code,
589 const void *data,
590 uint16_t data_size)
588{ 591{
589 struct ResultClosure *rcls = cls; 592 struct ResultClosure *rcls = cls;
590 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 593 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -1047,7 +1050,7 @@ guest_recv_entry_decision (void *cls,
1047 break; 1050 break;
1048 1051
1049 case TEST_GUEST_ENTER_BY_NAME: 1052 case TEST_GUEST_ENTER_BY_NAME:
1050 GNUNET_SCHEDULER_add_now (schedule_reconnect, NULL); 1053 GNUNET_SCHEDULER_add_now (&schedule_reconnect, NULL);
1051 break; 1054 break;
1052 1055
1053 default: 1056 default:
@@ -1313,7 +1316,8 @@ run (void *cls,
1313#endif 1316#endif
1314{ 1317{
1315 cfg = c; 1318 cfg = c;
1316 end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL); 1319 end_badly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
1320 &end_badly, NULL);
1317 1321
1318 core = GNUNET_CORE_connect (cfg, NULL, &core_connected, NULL, NULL, 1322 core = GNUNET_CORE_connect (cfg, NULL, &core_connected, NULL, NULL,
1319 NULL, GNUNET_NO, NULL, GNUNET_NO, NULL); 1323 NULL, GNUNET_NO, NULL, GNUNET_NO, NULL);