diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-29 22:59:57 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-29 22:59:57 +0000 |
commit | 88295b5a3adc0f17ffd5fa4d2c1fafc632db6dab (patch) | |
tree | 5d34f2f6c25074acbf27fd320e4cc170d36a83e0 | |
parent | 49d8694f79f2c716fd56f803e64e0b9008179970 (diff) | |
download | gnunet-88295b5a3adc0f17ffd5fa4d2c1fafc632db6dab.tar.gz gnunet-88295b5a3adc0f17ffd5fa4d2c1fafc632db6dab.zip |
-dce/fix ftbfs
-rw-r--r-- | src/hostlist/test_gnunet_daemon_hostlist_learning.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c index 6edc6cbbd..54f219ad8 100644 --- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c +++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c | |||
@@ -43,7 +43,6 @@ | |||
43 | struct PeerContext | 43 | struct PeerContext |
44 | { | 44 | { |
45 | struct GNUNET_CONFIGURATION_Handle *cfg; | 45 | struct GNUNET_CONFIGURATION_Handle *cfg; |
46 | struct GNUNET_TRANSPORT_Handle *th; | ||
47 | struct GNUNET_MessageHeader *hello; | 46 | struct GNUNET_MessageHeader *hello; |
48 | struct GNUNET_CORE_Handle *core; | 47 | struct GNUNET_CORE_Handle *core; |
49 | struct GNUNET_STATISTICS_Handle *stats; | 48 | struct GNUNET_STATISTICS_Handle *stats; |
@@ -123,22 +122,12 @@ shutdown_testcase () | |||
123 | GNUNET_free (current_adv_uri); | 122 | GNUNET_free (current_adv_uri); |
124 | current_adv_uri = NULL; | 123 | current_adv_uri = NULL; |
125 | } | 124 | } |
126 | if (adv_peer.th != NULL) | 125 | if (NULL != adv_peer.core) |
127 | { | ||
128 | GNUNET_TRANSPORT_disconnect (adv_peer.th); | ||
129 | adv_peer.th = NULL; | ||
130 | } | ||
131 | if (learn_peer.th != NULL) | ||
132 | { | ||
133 | GNUNET_TRANSPORT_disconnect (learn_peer.th); | ||
134 | learn_peer.th = NULL; | ||
135 | } | ||
136 | if (adv_peer.core != NULL) | ||
137 | { | 126 | { |
138 | GNUNET_CORE_disconnect (adv_peer.core); | 127 | GNUNET_CORE_disconnect (adv_peer.core); |
139 | adv_peer.core = NULL; | 128 | adv_peer.core = NULL; |
140 | } | 129 | } |
141 | if (learn_peer.core != NULL) | 130 | if (NULL != learn_peer.core) |
142 | { | 131 | { |
143 | GNUNET_CORE_disconnect (learn_peer.core); | 132 | GNUNET_CORE_disconnect (learn_peer.core); |
144 | learn_peer.core = NULL; | 133 | learn_peer.core = NULL; |
@@ -153,13 +142,18 @@ shutdown_testcase () | |||
153 | adv_peer.arm_proc = NULL; | 142 | adv_peer.arm_proc = NULL; |
154 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 143 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
155 | "Killing hostlist client ARM process.\n"); | 144 | "Killing hostlist client ARM process.\n"); |
156 | if (0 != GNUNET_OS_process_kill (learn_peer.arm_proc, GNUNET_TERM_SIG)) | 145 | if (0 != GNUNET_OS_process_kill (learn_peer.arm_proc, |
157 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 146 | GNUNET_TERM_SIG)) |
158 | if (GNUNET_OS_process_wait (learn_peer.arm_proc) != GNUNET_OK) | 147 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, |
159 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "waitpid"); | 148 | "kill"); |
149 | if (GNUNET_OK != | ||
150 | GNUNET_OS_process_wait (learn_peer.arm_proc)) | ||
151 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, | ||
152 | "waitpid"); | ||
160 | GNUNET_OS_process_destroy (learn_peer.arm_proc); | 153 | GNUNET_OS_process_destroy (learn_peer.arm_proc); |
161 | learn_peer.arm_proc = NULL; | 154 | learn_peer.arm_proc = NULL; |
162 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Shutdown complete....\n"); | 155 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
156 | "Shutdown complete....\n"); | ||
163 | } | 157 | } |
164 | 158 | ||
165 | /** | 159 | /** |