diff options
Diffstat (limited to 'src/namestore/test_namestore_api_monitoring.c')
-rw-r--r-- | src/namestore/test_namestore_api_monitoring.c | 390 |
1 files changed, 195 insertions, 195 deletions
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c index 8fbeb6479..f1ee980cc 100644 --- a/src/namestore/test_namestore_api_monitoring.c +++ b/src/namestore/test_namestore_api_monitoring.c | |||
@@ -11,12 +11,12 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
18 | SPDX-License-Identifier: AGPL3.0-or-later | 18 | SPDX-License-Identifier: AGPL3.0-or-later |
19 | */ | 19 | */ |
20 | /** | 20 | /** |
21 | * @file namestore/test_namestore_api_monitoring.c | 21 | * @file namestore/test_namestore_api_monitoring.c |
22 | * @brief testcase for zone monitoring functionality: monitor first, then add records | 22 | * @brief testcase for zone monitoring functionality: monitor first, then add records |
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | 32 | ||
33 | 33 | ||
34 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100) | 34 | #define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 100) |
35 | 35 | ||
36 | 36 | ||
37 | static struct GNUNET_NAMESTORE_Handle * nsh; | 37 | static struct GNUNET_NAMESTORE_Handle * nsh; |
@@ -62,63 +62,63 @@ struct GNUNET_NAMESTORE_QueueEntry * ns_ops[3]; | |||
62 | 62 | ||
63 | 63 | ||
64 | static void | 64 | static void |
65 | do_shutdown () | 65 | do_shutdown() |
66 | { | 66 | { |
67 | if (NULL != zm) | 67 | if (NULL != zm) |
68 | { | 68 | { |
69 | GNUNET_NAMESTORE_zone_monitor_stop (zm); | 69 | GNUNET_NAMESTORE_zone_monitor_stop(zm); |
70 | zm = NULL; | 70 | zm = NULL; |
71 | } | 71 | } |
72 | if (NULL != ns_ops[0]) | 72 | if (NULL != ns_ops[0]) |
73 | { | 73 | { |
74 | GNUNET_NAMESTORE_cancel(ns_ops[0]); | 74 | GNUNET_NAMESTORE_cancel(ns_ops[0]); |
75 | ns_ops[0] = NULL; | 75 | ns_ops[0] = NULL; |
76 | } | 76 | } |
77 | if (NULL != ns_ops[1]) | 77 | if (NULL != ns_ops[1]) |
78 | { | 78 | { |
79 | GNUNET_NAMESTORE_cancel(ns_ops[1]); | 79 | GNUNET_NAMESTORE_cancel(ns_ops[1]); |
80 | ns_ops[1] = NULL; | 80 | ns_ops[1] = NULL; |
81 | } | 81 | } |
82 | if (NULL != ns_ops[2]) | 82 | if (NULL != ns_ops[2]) |
83 | { | 83 | { |
84 | GNUNET_NAMESTORE_cancel(ns_ops[2]); | 84 | GNUNET_NAMESTORE_cancel(ns_ops[2]); |
85 | ns_ops[2] = NULL; | 85 | ns_ops[2] = NULL; |
86 | } | 86 | } |
87 | if (NULL != nsh) | 87 | if (NULL != nsh) |
88 | { | 88 | { |
89 | GNUNET_NAMESTORE_disconnect (nsh); | 89 | GNUNET_NAMESTORE_disconnect(nsh); |
90 | nsh = NULL; | 90 | nsh = NULL; |
91 | } | 91 | } |
92 | GNUNET_free_non_null(s_name_1); | 92 | GNUNET_free_non_null(s_name_1); |
93 | GNUNET_free_non_null(s_name_2); | 93 | GNUNET_free_non_null(s_name_2); |
94 | GNUNET_free_non_null(s_name_3); | 94 | GNUNET_free_non_null(s_name_3); |
95 | 95 | ||
96 | if (s_rd_1 != NULL) | 96 | if (s_rd_1 != NULL) |
97 | { | 97 | { |
98 | GNUNET_free ((void *)s_rd_1->data); | 98 | GNUNET_free((void *)s_rd_1->data); |
99 | GNUNET_free (s_rd_1); | 99 | GNUNET_free(s_rd_1); |
100 | } | 100 | } |
101 | if (s_rd_2 != NULL) | 101 | if (s_rd_2 != NULL) |
102 | { | 102 | { |
103 | GNUNET_free ((void *)s_rd_2->data); | 103 | GNUNET_free((void *)s_rd_2->data); |
104 | GNUNET_free (s_rd_2); | 104 | GNUNET_free(s_rd_2); |
105 | } | 105 | } |
106 | if (s_rd_3 != NULL) | 106 | if (s_rd_3 != NULL) |
107 | { | 107 | { |
108 | GNUNET_free ((void *)s_rd_3->data); | 108 | GNUNET_free((void *)s_rd_3->data); |
109 | GNUNET_free (s_rd_3); | 109 | GNUNET_free(s_rd_3); |
110 | } | 110 | } |
111 | 111 | ||
112 | if (NULL != privkey) | 112 | if (NULL != privkey) |
113 | { | 113 | { |
114 | GNUNET_free (privkey); | 114 | GNUNET_free(privkey); |
115 | privkey = NULL; | 115 | privkey = NULL; |
116 | } | 116 | } |
117 | if (NULL != privkey2) | 117 | if (NULL != privkey2) |
118 | { | 118 | { |
119 | GNUNET_free (privkey2); | 119 | GNUNET_free(privkey2); |
120 | privkey2 = NULL; | 120 | privkey2 = NULL; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | 123 | ||
124 | 124 | ||
@@ -128,218 +128,218 @@ do_shutdown () | |||
128 | * @param cls handle to use to re-connect. | 128 | * @param cls handle to use to re-connect. |
129 | */ | 129 | */ |
130 | static void | 130 | static void |
131 | endbadly (void *cls) | 131 | endbadly(void *cls) |
132 | { | 132 | { |
133 | do_shutdown (); | 133 | do_shutdown(); |
134 | res = 1; | 134 | res = 1; |
135 | } | 135 | } |
136 | 136 | ||
137 | 137 | ||
138 | static void | 138 | static void |
139 | end (void *cls) | 139 | end(void *cls) |
140 | { | 140 | { |
141 | do_shutdown (); | 141 | do_shutdown(); |
142 | res = 0; | 142 | res = 0; |
143 | } | 143 | } |
144 | 144 | ||
145 | 145 | ||
146 | static void | 146 | static void |
147 | zone_proc (void *cls, | 147 | zone_proc(void *cls, |
148 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, | 148 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone_key, |
149 | const char *name, | 149 | const char *name, |
150 | unsigned int rd_count, | 150 | unsigned int rd_count, |
151 | const struct GNUNET_GNSRECORD_Data *rd) | 151 | const struct GNUNET_GNSRECORD_Data *rd) |
152 | { | 152 | { |
153 | static int returned_records; | 153 | static int returned_records; |
154 | static int fail = GNUNET_NO; | 154 | static int fail = GNUNET_NO; |
155 | 155 | ||
156 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 156 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
157 | "Comparing results name %s\n", | 157 | "Comparing results name %s\n", |
158 | name); | 158 | name); |
159 | if (0 != GNUNET_memcmp (zone_key, | 159 | if (0 != GNUNET_memcmp(zone_key, |
160 | privkey)) | 160 | privkey)) |
161 | { | 161 | { |
162 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 162 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
163 | "Monitoring returned wrong zone key\n"); | 163 | "Monitoring returned wrong zone key\n"); |
164 | GNUNET_break (0); | 164 | GNUNET_break(0); |
165 | GNUNET_SCHEDULER_cancel (endbadly_task); | 165 | GNUNET_SCHEDULER_cancel(endbadly_task); |
166 | endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL); | 166 | endbadly_task = GNUNET_SCHEDULER_add_now(&endbadly, NULL); |
167 | return; | 167 | return; |
168 | } | 168 | } |
169 | 169 | ||
170 | if (0 == strcmp (name, s_name_1)) | 170 | if (0 == strcmp(name, s_name_1)) |
171 | { | ||
172 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_1)) | ||
173 | { | 171 | { |
174 | GNUNET_break (0); | 172 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_1)) |
175 | fail = GNUNET_YES; | 173 | { |
174 | GNUNET_break(0); | ||
175 | fail = GNUNET_YES; | ||
176 | } | ||
176 | } | 177 | } |
177 | } | 178 | else if (0 == strcmp(name, s_name_2)) |
178 | else if (0 == strcmp (name, s_name_2)) | ||
179 | { | ||
180 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_2)) | ||
181 | { | 179 | { |
182 | GNUNET_break (0); | 180 | if (GNUNET_YES != GNUNET_GNSRECORD_records_cmp(rd, s_rd_2)) |
183 | fail = GNUNET_YES; | 181 | { |
182 | GNUNET_break(0); | ||
183 | fail = GNUNET_YES; | ||
184 | } | ||
184 | } | 185 | } |
185 | } | ||
186 | else | 186 | else |
187 | { | 187 | { |
188 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 188 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
189 | "Invalid name %s\n", | 189 | "Invalid name %s\n", |
190 | name); | 190 | name); |
191 | GNUNET_break (0); | 191 | GNUNET_break(0); |
192 | fail = GNUNET_YES; | 192 | fail = GNUNET_YES; |
193 | } | 193 | } |
194 | GNUNET_NAMESTORE_zone_monitor_next (zm, | 194 | GNUNET_NAMESTORE_zone_monitor_next(zm, |
195 | 1); | 195 | 1); |
196 | if (2 == ++returned_records) | 196 | if (2 == ++returned_records) |
197 | { | ||
198 | if (endbadly_task != NULL) | ||
199 | { | 197 | { |
200 | GNUNET_SCHEDULER_cancel (endbadly_task); | 198 | if (endbadly_task != NULL) |
201 | endbadly_task = NULL; | 199 | { |
200 | GNUNET_SCHEDULER_cancel(endbadly_task); | ||
201 | endbadly_task = NULL; | ||
202 | } | ||
203 | if (GNUNET_YES == fail) | ||
204 | GNUNET_SCHEDULER_add_now(&endbadly, NULL); | ||
205 | else | ||
206 | GNUNET_SCHEDULER_add_now(&end, NULL); | ||
202 | } | 207 | } |
203 | if (GNUNET_YES == fail) | ||
204 | GNUNET_SCHEDULER_add_now (&endbadly, NULL); | ||
205 | else | ||
206 | GNUNET_SCHEDULER_add_now (&end, NULL); | ||
207 | } | ||
208 | } | 208 | } |
209 | 209 | ||
210 | 210 | ||
211 | static void | 211 | static void |
212 | put_cont (void *cls, | 212 | put_cont(void *cls, |
213 | int32_t success, | 213 | int32_t success, |
214 | const char *emsg) | 214 | const char *emsg) |
215 | { | 215 | { |
216 | static int c = 0; | 216 | static int c = 0; |
217 | char *label = cls; | 217 | char *label = cls; |
218 | 218 | ||
219 | if (0 == strcmp (label, s_name_1)) | 219 | if (0 == strcmp(label, s_name_1)) |
220 | ns_ops[0] = NULL; | 220 | ns_ops[0] = NULL; |
221 | else if (0 == strcmp (label, s_name_2)) | 221 | else if (0 == strcmp(label, s_name_2)) |
222 | ns_ops[1] = NULL; | 222 | ns_ops[1] = NULL; |
223 | else if (0 == strcmp (label, s_name_3)) | 223 | else if (0 == strcmp(label, s_name_3)) |
224 | ns_ops[2] = NULL; | 224 | ns_ops[2] = NULL; |
225 | 225 | ||
226 | if (success == GNUNET_OK) | 226 | if (success == GNUNET_OK) |
227 | { | 227 | { |
228 | c++; | 228 | c++; |
229 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 229 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
230 | "Created record %u: `%s'\n", | 230 | "Created record %u: `%s'\n", |
231 | c, | 231 | c, |
232 | label); | 232 | label); |
233 | } | 233 | } |
234 | else | 234 | else |
235 | { | 235 | { |
236 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 236 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
237 | "Failed to create record `%s'\n", | 237 | "Failed to create record `%s'\n", |
238 | label); | 238 | label); |
239 | GNUNET_break (0); | 239 | GNUNET_break(0); |
240 | GNUNET_SCHEDULER_cancel (endbadly_task); | 240 | GNUNET_SCHEDULER_cancel(endbadly_task); |
241 | endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, | 241 | endbadly_task = GNUNET_SCHEDULER_add_now(&endbadly, |
242 | NULL); | 242 | NULL); |
243 | } | 243 | } |
244 | } | 244 | } |
245 | 245 | ||
246 | 246 | ||
247 | static struct GNUNET_GNSRECORD_Data * | 247 | static struct GNUNET_GNSRECORD_Data * |
248 | create_record (unsigned int count) | 248 | create_record(unsigned int count) |
249 | { | 249 | { |
250 | struct GNUNET_GNSRECORD_Data *rd; | 250 | struct GNUNET_GNSRECORD_Data *rd; |
251 | 251 | ||
252 | rd = GNUNET_new_array (count, | 252 | rd = GNUNET_new_array(count, |
253 | struct GNUNET_GNSRECORD_Data); | 253 | struct GNUNET_GNSRECORD_Data); |
254 | for (unsigned int c = 0; c < count; c++) | 254 | for (unsigned int c = 0; c < count; c++) |
255 | { | 255 | { |
256 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS).abs_value_us; | 256 | rd[c].expiration_time = GNUNET_TIME_relative_to_absolute(GNUNET_TIME_UNIT_HOURS).abs_value_us; |
257 | rd[c].record_type = TEST_RECORD_TYPE; | 257 | rd[c].record_type = TEST_RECORD_TYPE; |
258 | rd[c].data_size = 50; | 258 | rd[c].data_size = 50; |
259 | rd[c].data = GNUNET_malloc(50); | 259 | rd[c].data = GNUNET_malloc(50); |
260 | rd[c].flags = 0; | 260 | rd[c].flags = 0; |
261 | memset ((char *) rd[c].data, 'a', 50); | 261 | memset((char *)rd[c].data, 'a', 50); |
262 | } | 262 | } |
263 | return rd; | 263 | return rd; |
264 | } | 264 | } |
265 | 265 | ||
266 | 266 | ||
267 | static void | 267 | static void |
268 | fail_cb (void *cls) | 268 | fail_cb(void *cls) |
269 | { | 269 | { |
270 | GNUNET_assert (0); | 270 | GNUNET_assert(0); |
271 | } | 271 | } |
272 | 272 | ||
273 | 273 | ||
274 | static void | 274 | static void |
275 | sync_cb (void *cls) | 275 | sync_cb(void *cls) |
276 | { | 276 | { |
277 | /* do nothing */ | 277 | /* do nothing */ |
278 | } | 278 | } |
279 | 279 | ||
280 | 280 | ||
281 | static void | 281 | static void |
282 | run (void *cls, | 282 | run(void *cls, |
283 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 283 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
284 | struct GNUNET_TESTING_Peer *peer) | 284 | struct GNUNET_TESTING_Peer *peer) |
285 | { | 285 | { |
286 | res = 1; | 286 | res = 1; |
287 | privkey = GNUNET_CRYPTO_ecdsa_key_create (); | 287 | privkey = GNUNET_CRYPTO_ecdsa_key_create(); |
288 | GNUNET_assert (privkey != NULL); | 288 | GNUNET_assert(privkey != NULL); |
289 | 289 | ||
290 | /* Start monitoring */ | 290 | /* Start monitoring */ |
291 | zm = GNUNET_NAMESTORE_zone_monitor_start (cfg, | 291 | zm = GNUNET_NAMESTORE_zone_monitor_start(cfg, |
292 | privkey, | 292 | privkey, |
293 | GNUNET_YES, | 293 | GNUNET_YES, |
294 | &fail_cb, | 294 | &fail_cb, |
295 | NULL, | 295 | NULL, |
296 | &zone_proc, | 296 | &zone_proc, |
297 | NULL, | 297 | NULL, |
298 | &sync_cb, | 298 | &sync_cb, |
299 | NULL); | 299 | NULL); |
300 | if (NULL == zm) | 300 | if (NULL == zm) |
301 | { | 301 | { |
302 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 302 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
303 | "Failed to create zone monitor\n"); | 303 | "Failed to create zone monitor\n"); |
304 | GNUNET_break (0); | 304 | GNUNET_break(0); |
305 | endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL); | 305 | endbadly_task = GNUNET_SCHEDULER_add_now(&endbadly, NULL); |
306 | return; | 306 | return; |
307 | } | 307 | } |
308 | 308 | ||
309 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &endbadly, NULL); | 309 | endbadly_task = GNUNET_SCHEDULER_add_delayed(TIMEOUT, &endbadly, NULL); |
310 | /* Connect to namestore */ | 310 | /* Connect to namestore */ |
311 | nsh = GNUNET_NAMESTORE_connect (cfg); | 311 | nsh = GNUNET_NAMESTORE_connect(cfg); |
312 | if (NULL == nsh) | 312 | if (NULL == nsh) |
313 | { | 313 | { |
314 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Connect to namestore\n"); | 314 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Connect to namestore\n"); |
315 | GNUNET_break (0); | 315 | GNUNET_break(0); |
316 | endbadly_task = GNUNET_SCHEDULER_add_now (&endbadly, NULL); | 316 | endbadly_task = GNUNET_SCHEDULER_add_now(&endbadly, NULL); |
317 | return; | 317 | return; |
318 | } | 318 | } |
319 | 319 | ||
320 | privkey2 = GNUNET_CRYPTO_ecdsa_key_create (); | 320 | privkey2 = GNUNET_CRYPTO_ecdsa_key_create(); |
321 | GNUNET_assert (privkey2 != NULL); | 321 | GNUNET_assert(privkey2 != NULL); |
322 | 322 | ||
323 | 323 | ||
324 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 324 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
325 | "Created record 3\n"); | 325 | "Created record 3\n"); |
326 | /* name in different zone */ | 326 | /* name in different zone */ |
327 | GNUNET_asprintf(&s_name_3, "dummy3"); | 327 | GNUNET_asprintf(&s_name_3, "dummy3"); |
328 | s_rd_3 = create_record(1); | 328 | s_rd_3 = create_record(1); |
329 | GNUNET_assert (NULL != (ns_ops[2] = | 329 | GNUNET_assert(NULL != (ns_ops[2] = |
330 | GNUNET_NAMESTORE_records_store (nsh, | 330 | GNUNET_NAMESTORE_records_store(nsh, |
331 | privkey2, | 331 | privkey2, |
332 | s_name_3, | 332 | s_name_3, |
333 | 1, | 333 | 1, |
334 | s_rd_3, | 334 | s_rd_3, |
335 | &put_cont, | 335 | &put_cont, |
336 | s_name_3))); | 336 | s_name_3))); |
337 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 337 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
338 | "Created record 1\n"); | 338 | "Created record 1\n"); |
339 | GNUNET_asprintf(&s_name_1, "dummy1"); | 339 | GNUNET_asprintf(&s_name_1, "dummy1"); |
340 | s_rd_1 = create_record(1); | 340 | s_rd_1 = create_record(1); |
341 | GNUNET_assert (NULL != (ns_ops[0] = | 341 | GNUNET_assert(NULL != (ns_ops[0] = |
342 | GNUNET_NAMESTORE_records_store (nsh, | 342 | GNUNET_NAMESTORE_records_store(nsh, |
343 | privkey, | 343 | privkey, |
344 | s_name_1, | 344 | s_name_1, |
345 | 1, | 345 | 1, |
@@ -348,11 +348,11 @@ run (void *cls, | |||
348 | s_name_1))); | 348 | s_name_1))); |
349 | 349 | ||
350 | 350 | ||
351 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n"); | 351 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Created record 2 \n"); |
352 | GNUNET_asprintf(&s_name_2, "dummy2"); | 352 | GNUNET_asprintf(&s_name_2, "dummy2"); |
353 | s_rd_2 = create_record(1); | 353 | s_rd_2 = create_record(1); |
354 | GNUNET_assert (NULL != (ns_ops[1] = | 354 | GNUNET_assert(NULL != (ns_ops[1] = |
355 | GNUNET_NAMESTORE_records_store (nsh, | 355 | GNUNET_NAMESTORE_records_store(nsh, |
356 | privkey, | 356 | privkey, |
357 | s_name_2, | 357 | s_name_2, |
358 | 1, | 358 | 1, |
@@ -366,25 +366,25 @@ run (void *cls, | |||
366 | 366 | ||
367 | 367 | ||
368 | int | 368 | int |
369 | main (int argc, | 369 | main(int argc, |
370 | char *argv[]) | 370 | char *argv[]) |
371 | { | 371 | { |
372 | const char *plugin_name; | 372 | const char *plugin_name; |
373 | char *cfg_name; | 373 | char *cfg_name; |
374 | 374 | ||
375 | SETUP_CFG (plugin_name, cfg_name); | 375 | SETUP_CFG(plugin_name, cfg_name); |
376 | res = 1; | 376 | res = 1; |
377 | if (0 != | 377 | if (0 != |
378 | GNUNET_TESTING_peer_run ("test-namestore-api-monitoring", | 378 | GNUNET_TESTING_peer_run("test-namestore-api-monitoring", |
379 | cfg_name, | 379 | cfg_name, |
380 | &run, | 380 | &run, |
381 | NULL)) | 381 | NULL)) |
382 | { | 382 | { |
383 | res = 1; | 383 | res = 1; |
384 | } | 384 | } |
385 | GNUNET_DISK_purge_cfg_dir (cfg_name, | 385 | GNUNET_DISK_purge_cfg_dir(cfg_name, |
386 | "GNUNET_TEST_HOME"); | 386 | "GNUNET_TEST_HOME"); |
387 | GNUNET_free (cfg_name); | 387 | GNUNET_free(cfg_name); |
388 | return res; | 388 | return res; |
389 | } | 389 | } |
390 | 390 | ||