diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-07-02 20:02:00 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-07-02 20:02:00 +0000 |
commit | 71d648a0bfd6def8d7a28673169f9ee623b76702 (patch) | |
tree | 1ac3556760f2ed2d27fbec13a919dc7c60dd9301 /src/core/test_core_api.c | |
parent | 0ef6f53af499d8b114cd31c101989a33e2c96daa (diff) | |
download | gnunet-71d648a0bfd6def8d7a28673169f9ee623b76702.tar.gz gnunet-71d648a0bfd6def8d7a28673169f9ee623b76702.zip |
cleanup
Diffstat (limited to 'src/core/test_core_api.c')
-rw-r--r-- | src/core/test_core_api.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index c7f73120d..9423062db 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -107,12 +107,28 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
107 | fprintf(stderr, "ENDING ANGRILY %u\n", ok); | 107 | fprintf(stderr, "ENDING ANGRILY %u\n", ok); |
108 | #endif | 108 | #endif |
109 | GNUNET_break (0); | 109 | GNUNET_break (0); |
110 | GNUNET_CORE_disconnect (p1.ch); | 110 | if (NULL != p1.ch) |
111 | GNUNET_CORE_disconnect (p2.ch); | 111 | { |
112 | GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); | 112 | GNUNET_CORE_disconnect (p1.ch); |
113 | GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); | 113 | p1.ch = NULL; |
114 | GNUNET_TRANSPORT_disconnect (p1.th); | 114 | } |
115 | GNUNET_TRANSPORT_disconnect (p2.th); | 115 | if (NULL != p2.ch) |
116 | { | ||
117 | GNUNET_CORE_disconnect (p2.ch); | ||
118 | p2.ch = NULL; | ||
119 | } | ||
120 | if (p1.th != NULL) | ||
121 | { | ||
122 | GNUNET_TRANSPORT_get_hello_cancel (p1.th, &process_hello, &p1); | ||
123 | GNUNET_TRANSPORT_disconnect (p1.th); | ||
124 | p1.th = NULL; | ||
125 | } | ||
126 | if (p2.th != NULL) | ||
127 | { | ||
128 | GNUNET_TRANSPORT_get_hello_cancel (p2.th, &process_hello, &p2); | ||
129 | GNUNET_TRANSPORT_disconnect (p2.th); | ||
130 | p2.th = NULL; | ||
131 | } | ||
116 | ok = 42; | 132 | ok = 42; |
117 | } | 133 | } |
118 | 134 | ||