diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-11 21:43:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-11 21:43:34 +0200 |
commit | 90ff9edfa9c5fcfa3a36d1653ff105e89b888e21 (patch) | |
tree | 780a2071f5072c8e8e044db741eb295c3f3ea2a7 /src/namestore/test_namestore_api_monitoring_existing.c | |
parent | 3bcfe59f1ce533246bda271f00b3ee957cae304d (diff) | |
download | gnunet-90ff9edfa9c5fcfa3a36d1653ff105e89b888e21.tar.gz gnunet-90ff9edfa9c5fcfa3a36d1653ff105e89b888e21.zip |
fixing #6149
Diffstat (limited to 'src/namestore/test_namestore_api_monitoring_existing.c')
-rw-r--r-- | src/namestore/test_namestore_api_monitoring_existing.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c b/src/namestore/test_namestore_api_monitoring_existing.c index a0951b943..040a63f91 100644 --- a/src/namestore/test_namestore_api_monitoring_existing.c +++ b/src/namestore/test_namestore_api_monitoring_existing.c | |||
@@ -38,9 +38,9 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
38 | 38 | ||
39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 39 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
40 | 40 | ||
41 | static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; | 41 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; |
42 | 42 | ||
43 | static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey2; | 43 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey2; |
44 | 44 | ||
45 | static struct GNUNET_NAMESTORE_ZoneMonitor *zm; | 45 | static struct GNUNET_NAMESTORE_ZoneMonitor *zm; |
46 | 46 | ||
@@ -124,16 +124,6 @@ end (void *cls) | |||
124 | GNUNET_free ((void *) s_rd_3->data); | 124 | GNUNET_free ((void *) s_rd_3->data); |
125 | GNUNET_free (s_rd_3); | 125 | GNUNET_free (s_rd_3); |
126 | } | 126 | } |
127 | if (NULL != privkey) | ||
128 | { | ||
129 | GNUNET_free (privkey); | ||
130 | privkey = NULL; | ||
131 | } | ||
132 | if (NULL != privkey2) | ||
133 | { | ||
134 | GNUNET_free (privkey2); | ||
135 | privkey2 = NULL; | ||
136 | } | ||
137 | } | 127 | } |
138 | 128 | ||
139 | 129 | ||
@@ -151,7 +141,7 @@ zone_proc (void *cls, | |||
151 | "Comparing results name %s\n", | 141 | "Comparing results name %s\n", |
152 | name); | 142 | name); |
153 | if (0 != GNUNET_memcmp (zone_key, | 143 | if (0 != GNUNET_memcmp (zone_key, |
154 | privkey)) | 144 | &privkey)) |
155 | { | 145 | { |
156 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 146 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
157 | "Monitoring returned wrong zone key\n"); | 147 | "Monitoring returned wrong zone key\n"); |
@@ -262,7 +252,7 @@ put_cont (void *cls, | |||
262 | { | 252 | { |
263 | /* Start monitoring */ | 253 | /* Start monitoring */ |
264 | zm = GNUNET_NAMESTORE_zone_monitor_start (cfg, | 254 | zm = GNUNET_NAMESTORE_zone_monitor_start (cfg, |
265 | privkey, | 255 | &privkey, |
266 | GNUNET_YES, | 256 | GNUNET_YES, |
267 | &fail_cb, | 257 | &fail_cb, |
268 | NULL, | 258 | NULL, |
@@ -312,10 +302,8 @@ run (void *cls, | |||
312 | struct GNUNET_TESTING_Peer *peer) | 302 | struct GNUNET_TESTING_Peer *peer) |
313 | { | 303 | { |
314 | res = 1; | 304 | res = 1; |
315 | privkey = GNUNET_CRYPTO_ecdsa_key_create (); | 305 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); |
316 | GNUNET_assert (NULL != privkey); | 306 | GNUNET_CRYPTO_ecdsa_key_create (&privkey2); |
317 | privkey2 = GNUNET_CRYPTO_ecdsa_key_create (); | ||
318 | GNUNET_assert (NULL != privkey2); | ||
319 | 307 | ||
320 | cfg = mycfg; | 308 | cfg = mycfg; |
321 | GNUNET_SCHEDULER_add_shutdown (&end, | 309 | GNUNET_SCHEDULER_add_shutdown (&end, |
@@ -342,7 +330,7 @@ run (void *cls, | |||
342 | s_rd_3 = create_record (1); | 330 | s_rd_3 = create_record (1); |
343 | GNUNET_assert (NULL != (ns_ops[2] = | 331 | GNUNET_assert (NULL != (ns_ops[2] = |
344 | GNUNET_NAMESTORE_records_store (nsh, | 332 | GNUNET_NAMESTORE_records_store (nsh, |
345 | privkey2, | 333 | &privkey2, |
346 | s_name_3, | 334 | s_name_3, |
347 | 1, | 335 | 1, |
348 | s_rd_3, | 336 | s_rd_3, |
@@ -355,7 +343,7 @@ run (void *cls, | |||
355 | s_rd_1 = create_record (1); | 343 | s_rd_1 = create_record (1); |
356 | GNUNET_assert (NULL != (ns_ops[0] = | 344 | GNUNET_assert (NULL != (ns_ops[0] = |
357 | GNUNET_NAMESTORE_records_store (nsh, | 345 | GNUNET_NAMESTORE_records_store (nsh, |
358 | privkey, | 346 | &privkey, |
359 | s_name_1, | 347 | s_name_1, |
360 | 1, | 348 | 1, |
361 | s_rd_1, | 349 | s_rd_1, |
@@ -367,7 +355,7 @@ run (void *cls, | |||
367 | s_rd_2 = create_record (1); | 355 | s_rd_2 = create_record (1); |
368 | GNUNET_assert (NULL != (ns_ops[1] = | 356 | GNUNET_assert (NULL != (ns_ops[1] = |
369 | GNUNET_NAMESTORE_records_store (nsh, | 357 | GNUNET_NAMESTORE_records_store (nsh, |
370 | privkey, | 358 | &privkey, |
371 | s_name_2, | 359 | s_name_2, |
372 | 1, | 360 | 1, |
373 | s_rd_2, | 361 | s_rd_2, |