diff options
Diffstat (limited to 'src/namestore/test_namestore_api_remove.c')
-rw-r--r-- | src/namestore/test_namestore_api_remove.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index 568a0cd8b..3f3823e89 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -96,8 +96,8 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
96 | 96 | ||
97 | 97 | ||
98 | static void | 98 | static void |
99 | remove_cont (void *cls, | 99 | remove_cont (void *cls, |
100 | int32_t success, | 100 | int32_t success, |
101 | const char *emsg) | 101 | const char *emsg) |
102 | { | 102 | { |
103 | if (GNUNET_YES != success) | 103 | if (GNUNET_YES != success) |
@@ -128,16 +128,16 @@ rd_decrypt_cb (void *cls, | |||
128 | 128 | ||
129 | GNUNET_assert (GNUNET_NO == removed); | 129 | GNUNET_assert (GNUNET_NO == removed); |
130 | GNUNET_assert (1 == rd_count); | 130 | GNUNET_assert (1 == rd_count); |
131 | GNUNET_assert (NULL != rd); | 131 | GNUNET_assert (NULL != rd); |
132 | memset (rd_cmp_data, 'a', TEST_RECORD_DATALEN); | 132 | memset (rd_cmp_data, 'a', TEST_RECORD_DATALEN); |
133 | 133 | ||
134 | GNUNET_assert (TEST_RECORD_TYPE == rd[0].record_type); | 134 | GNUNET_assert (TEST_RECORD_TYPE == rd[0].record_type); |
135 | GNUNET_assert (TEST_RECORD_DATALEN == rd[0].data_size); | 135 | GNUNET_assert (TEST_RECORD_DATALEN == rd[0].data_size); |
136 | GNUNET_assert (0 == memcmp (&rd_cmp_data, rd[0].data, TEST_RECORD_DATALEN)); | 136 | GNUNET_assert (0 == memcmp (&rd_cmp_data, rd[0].data, TEST_RECORD_DATALEN)); |
137 | 137 | ||
138 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 138 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
139 | "Block was decrypted successfully, removing records \n"); | 139 | "Block was decrypted successfully, removing records \n"); |
140 | 140 | ||
141 | nsqe = GNUNET_NAMESTORE_records_store (nsh, privkey, name, | 141 | nsqe = GNUNET_NAMESTORE_records_store (nsh, privkey, name, |
142 | 0, NULL, &remove_cont, (void *) name); | 142 | 0, NULL, &remove_cont, (void *) name); |
143 | } | 143 | } |
@@ -178,14 +178,14 @@ name_lookup_proc (void *cls, | |||
178 | } | 178 | } |
179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
180 | "Namestore returned block, decrypting \n"); | 180 | "Namestore returned block, decrypting \n"); |
181 | GNUNET_assert (GNUNET_OK == | 181 | GNUNET_assert (GNUNET_OK == |
182 | GNUNET_NAMESTORE_block_decrypt (block, | 182 | GNUNET_NAMESTORE_block_decrypt (block, |
183 | &pubkey, name, &rd_decrypt_cb, (void *) name)); | 183 | &pubkey, name, &rd_decrypt_cb, (void *) name)); |
184 | } | 184 | } |
185 | 185 | ||
186 | 186 | ||
187 | static void | 187 | static void |
188 | put_cont (void *cls, int32_t success, | 188 | put_cont (void *cls, int32_t success, |
189 | const char *emsg) | 189 | const char *emsg) |
190 | { | 190 | { |
191 | const char *name = cls; | 191 | const char *name = cls; |
@@ -195,7 +195,7 @@ put_cont (void *cls, int32_t success, | |||
195 | { | 195 | { |
196 | GNUNET_break (0); | 196 | GNUNET_break (0); |
197 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 197 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
198 | "Namestore could not store record: `%s'\n", | 198 | "Namestore could not store record: `%s'\n", |
199 | emsg); | 199 | emsg); |
200 | if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) | 200 | if (endbadly_task != GNUNET_SCHEDULER_NO_TASK) |
201 | GNUNET_SCHEDULER_cancel (endbadly_task); | 201 | GNUNET_SCHEDULER_cancel (endbadly_task); |
@@ -229,7 +229,7 @@ put_cont (void *cls, int32_t success, | |||
229 | 229 | ||
230 | 230 | ||
231 | static void | 231 | static void |
232 | run (void *cls, | 232 | run (void *cls, |
233 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 233 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
234 | struct GNUNET_TESTING_Peer *peer) | 234 | struct GNUNET_TESTING_Peer *peer) |
235 | { | 235 | { |
@@ -274,7 +274,7 @@ int | |||
274 | main (int argc, char *argv[]) | 274 | main (int argc, char *argv[]) |
275 | { | 275 | { |
276 | res = 1; | 276 | res = 1; |
277 | if (0 != | 277 | if (0 != |
278 | GNUNET_TESTING_service_run ("test-namestore-api", | 278 | GNUNET_TESTING_service_run ("test-namestore-api", |
279 | "namestore", | 279 | "namestore", |
280 | "test_namestore_api.conf", | 280 | "test_namestore_api.conf", |