diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-11-19 15:19:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-11-19 15:19:55 +0000 |
commit | cf19b632e148d9805faa13f1e397f2ed7465bf59 (patch) | |
tree | 229c7995d0ab3775b0d099cc0dfe13a71d3bf484 /src/conversation | |
parent | 3085c1194746a2874d6a7f56ba4222524ee9a161 (diff) | |
download | gnunet-cf19b632e148d9805faa13f1e397f2ed7465bf59.tar.gz gnunet-cf19b632e148d9805faa13f1e397f2ed7465bf59.zip |
-do not crash on exit, even if mesh died
Diffstat (limited to 'src/conversation')
-rw-r--r-- | src/conversation/test_conversation_api.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/conversation/test_conversation_api.c b/src/conversation/test_conversation_api.c index f63844c0b..d8c10c2bf 100644 --- a/src/conversation/test_conversation_api.c +++ b/src/conversation/test_conversation_api.c | |||
@@ -36,6 +36,8 @@ | |||
36 | 36 | ||
37 | #define FREQ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 250) | 37 | #define FREQ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 250) |
38 | 38 | ||
39 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 25) | ||
40 | |||
39 | static int ok = 1; | 41 | static int ok = 1; |
40 | 42 | ||
41 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 43 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
@@ -374,6 +376,9 @@ call_event_handler (void *cls, | |||
374 | break; | 376 | break; |
375 | case GNUNET_CONVERSATION_EC_CALL_GNS_FAIL: | 377 | case GNUNET_CONVERSATION_EC_CALL_GNS_FAIL: |
376 | case GNUNET_CONVERSATION_EC_CALL_HUNG_UP: | 378 | case GNUNET_CONVERSATION_EC_CALL_HUNG_UP: |
379 | call = NULL; | ||
380 | fprintf (stderr, "Unexpected call code: %d\n", code); | ||
381 | break; | ||
377 | case GNUNET_CONVERSATION_EC_CALL_SUSPENDED: | 382 | case GNUNET_CONVERSATION_EC_CALL_SUSPENDED: |
378 | case GNUNET_CONVERSATION_EC_CALL_RESUMED: | 383 | case GNUNET_CONVERSATION_EC_CALL_RESUMED: |
379 | fprintf (stderr, "Unexpected call code: %d\n", code); | 384 | fprintf (stderr, "Unexpected call code: %d\n", code); |
@@ -475,8 +480,7 @@ run (void *cls, | |||
475 | struct GNUNET_TESTING_Peer *peer) | 480 | struct GNUNET_TESTING_Peer *peer) |
476 | { | 481 | { |
477 | cfg = c; | 482 | cfg = c; |
478 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 483 | GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test, |
479 | (GNUNET_TIME_UNIT_MINUTES, 1), &end_test, | ||
480 | NULL); | 484 | NULL); |
481 | id = GNUNET_IDENTITY_connect (cfg, | 485 | id = GNUNET_IDENTITY_connect (cfg, |
482 | &identity_cb, | 486 | &identity_cb, |