diff options
Diffstat (limited to 'src/namestore/test_namestore_api_remove_not_existing_record.c')
-rw-r--r-- | src/namestore/test_namestore_api_remove_not_existing_record.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/namestore/test_namestore_api_remove_not_existing_record.c b/src/namestore/test_namestore_api_remove_not_existing_record.c index 217f8a51a..75e1cc3ed 100644 --- a/src/namestore/test_namestore_api_remove_not_existing_record.c +++ b/src/namestore/test_namestore_api_remove_not_existing_record.c | |||
@@ -38,7 +38,7 @@ 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_EcdsaPublicKey pubkey; | 43 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; |
44 | 44 | ||
@@ -48,18 +48,13 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
48 | 48 | ||
49 | 49 | ||
50 | static void | 50 | static void |
51 | cleanup () | 51 | cleanup (void) |
52 | { | 52 | { |
53 | if (NULL != nsh) | 53 | if (NULL != nsh) |
54 | { | 54 | { |
55 | GNUNET_NAMESTORE_disconnect (nsh); | 55 | GNUNET_NAMESTORE_disconnect (nsh); |
56 | nsh = NULL; | 56 | nsh = NULL; |
57 | } | 57 | } |
58 | if (NULL != privkey) | ||
59 | { | ||
60 | GNUNET_free (privkey); | ||
61 | privkey = NULL; | ||
62 | } | ||
63 | GNUNET_SCHEDULER_shutdown (); | 58 | GNUNET_SCHEDULER_shutdown (); |
64 | } | 59 | } |
65 | 60 | ||
@@ -137,13 +132,14 @@ run (void *cls, | |||
137 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 132 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
138 | &endbadly, | 133 | &endbadly, |
139 | NULL); | 134 | NULL); |
140 | privkey = GNUNET_CRYPTO_ecdsa_key_create (); | 135 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); |
141 | GNUNET_assert (privkey != NULL); | 136 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, &pubkey); |
142 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey); | ||
143 | 137 | ||
144 | nsh = GNUNET_NAMESTORE_connect (cfg); | 138 | nsh = GNUNET_NAMESTORE_connect (cfg); |
145 | GNUNET_break (NULL != nsh); | 139 | GNUNET_break (NULL != nsh); |
146 | nsqe = GNUNET_NAMESTORE_records_store (nsh, privkey, name, | 140 | nsqe = GNUNET_NAMESTORE_records_store (nsh, |
141 | &privkey, | ||
142 | name, | ||
147 | 0, NULL, | 143 | 0, NULL, |
148 | &put_cont, (void *) name); | 144 | &put_cont, (void *) name); |
149 | if (NULL == nsqe) | 145 | if (NULL == nsqe) |