aboutsummaryrefslogtreecommitdiff
path: root/src/datastore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-12 19:07:40 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-12 19:07:40 +0000
commit6c471eeb15e27f8226492b4860a3c2acb94c5f25 (patch)
treea3a9dcba12ee5356c03056c10b7aba5367b2ef34 /src/datastore
parent16bcbbea7133fd2265d46bd2ae1dc70e8c9ba96f (diff)
downloadgnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.tar.gz
gnunet-6c471eeb15e27f8226492b4860a3c2acb94c5f25.zip
-consistently use struct GNUNET_HashCode
Diffstat (limited to 'src/datastore')
-rw-r--r--src/datastore/datastore.h6
-rw-r--r--src/datastore/datastore_api.c8
-rw-r--r--src/datastore/gnunet-service-datastore.c18
-rw-r--r--src/datastore/perf_datastore_api.c10
-rw-r--r--src/datastore/perf_plugin_datastore.c10
-rw-r--r--src/datastore/plugin_datastore_mysql.c32
-rw-r--r--src/datastore/plugin_datastore_postgres.c32
-rw-r--r--src/datastore/plugin_datastore_sqlite.c28
-rw-r--r--src/datastore/plugin_datastore_template.c6
-rw-r--r--src/datastore/test_datastore_api.c14
-rw-r--r--src/datastore/test_datastore_api_management.c8
-rw-r--r--src/datastore/test_plugin_datastore.c12
12 files changed, 92 insertions, 92 deletions
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h
index 87ceb0134..4f431856b 100644
--- a/src/datastore/datastore.h
+++ b/src/datastore/datastore.h
@@ -111,7 +111,7 @@ struct GetMessage
111 /** 111 /**
112 * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size 112 * Type is GNUNET_MESSAGE_TYPE_DATASTORE_GET. Size
113 * can either be "sizeof(struct GetMessage)" or 113 * can either be "sizeof(struct GetMessage)" or
114 * "sizeof(struct GetMessage) - sizeof(GNUNET_HashCode)"! 114 * "sizeof(struct GetMessage) - sizeof(struct GNUNET_HashCode)"!
115 */ 115 */
116 struct GNUNET_MessageHeader header; 116 struct GNUNET_MessageHeader header;
117 117
@@ -129,7 +129,7 @@ struct GetMessage
129 * Desired key (optional). Check the "size" of the 129 * Desired key (optional). Check the "size" of the
130 * header to see if the key is actually present. 130 * header to see if the key is actually present.
131 */ 131 */
132 GNUNET_HashCode key; 132 struct GNUNET_HashCode key;
133 133
134}; 134};
135 135
@@ -252,7 +252,7 @@ struct DataMessage
252 /** 252 /**
253 * Key under which the item can be found. 253 * Key under which the item can be found.
254 */ 254 */
255 GNUNET_HashCode key; 255 struct GNUNET_HashCode key;
256 256
257}; 257};
258GNUNET_NETWORK_STRUCT_END 258GNUNET_NETWORK_STRUCT_END
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 57663e99e..3bf8ecd94 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -836,7 +836,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg)
836 */ 836 */
837struct GNUNET_DATASTORE_QueueEntry * 837struct GNUNET_DATASTORE_QueueEntry *
838GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid, 838GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
839 const GNUNET_HashCode * key, size_t size, 839 const struct GNUNET_HashCode * key, size_t size,
840 const void *data, enum GNUNET_BLOCK_Type type, 840 const void *data, enum GNUNET_BLOCK_Type type,
841 uint32_t priority, uint32_t anonymity, 841 uint32_t priority, uint32_t anonymity,
842 uint32_t replication, 842 uint32_t replication,
@@ -1087,7 +1087,7 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
1087 */ 1087 */
1088struct GNUNET_DATASTORE_QueueEntry * 1088struct GNUNET_DATASTORE_QueueEntry *
1089GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h, 1089GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
1090 const GNUNET_HashCode * key, size_t size, 1090 const struct GNUNET_HashCode * key, size_t size,
1091 const void *data, unsigned int queue_priority, 1091 const void *data, unsigned int queue_priority,
1092 unsigned int max_queue_size, 1092 unsigned int max_queue_size,
1093 struct GNUNET_TIME_Relative timeout, 1093 struct GNUNET_TIME_Relative timeout,
@@ -1381,7 +1381,7 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
1381 */ 1381 */
1382struct GNUNET_DATASTORE_QueueEntry * 1382struct GNUNET_DATASTORE_QueueEntry *
1383GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset, 1383GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
1384 const GNUNET_HashCode * key, 1384 const struct GNUNET_HashCode * key,
1385 enum GNUNET_BLOCK_Type type, 1385 enum GNUNET_BLOCK_Type type,
1386 unsigned int queue_priority, 1386 unsigned int queue_priority,
1387 unsigned int max_queue_size, 1387 unsigned int max_queue_size,
@@ -1420,7 +1420,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
1420 else 1420 else
1421 { 1421 {
1422 gm->header.size = 1422 gm->header.size =
1423 htons (sizeof (struct GetMessage) - sizeof (GNUNET_HashCode)); 1423 htons (sizeof (struct GetMessage) - sizeof (struct GNUNET_HashCode));
1424 } 1424 }
1425 process_queue (h); 1425 process_queue (h);
1426 return qe; 1426 return qe;
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 49b9db859..6fb1ebf1b 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -316,7 +316,7 @@ delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
316 * GNUNET_NO to delete the item and continue (if supported) 316 * GNUNET_NO to delete the item and continue (if supported)
317 */ 317 */
318static int 318static int
319expired_processor (void *cls, const GNUNET_HashCode * key, uint32_t size, 319expired_processor (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
320 const void *data, enum GNUNET_BLOCK_Type type, 320 const void *data, enum GNUNET_BLOCK_Type type,
321 uint32_t priority, uint32_t anonymity, 321 uint32_t priority, uint32_t anonymity,
322 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 322 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -394,7 +394,7 @@ delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
394 * GNUNET_NO to delete the item and continue (if supported) 394 * GNUNET_NO to delete the item and continue (if supported)
395 */ 395 */
396static int 396static int
397quota_processor (void *cls, const GNUNET_HashCode * key, uint32_t size, 397quota_processor (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
398 const void *data, enum GNUNET_BLOCK_Type type, 398 const void *data, enum GNUNET_BLOCK_Type type,
399 uint32_t priority, uint32_t anonymity, 399 uint32_t priority, uint32_t anonymity,
400 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 400 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -581,7 +581,7 @@ transmit_status (struct GNUNET_SERVER_Client *client, int code, const char *msg)
581 * GNUNET_NO to delete the item and continue (if supported) 581 * GNUNET_NO to delete the item and continue (if supported)
582 */ 582 */
583static int 583static int
584transmit_item (void *cls, const GNUNET_HashCode * key, uint32_t size, 584transmit_item (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
585 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 585 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
586 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 586 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
587 uint64_t uid) 587 uint64_t uid)
@@ -871,7 +871,7 @@ execute_put (struct GNUNET_SERVER_Client *client, const struct DataMessage *dm)
871 * GNUNET_NO to delete the item 871 * GNUNET_NO to delete the item
872 */ 872 */
873static int 873static int
874check_present (void *cls, const GNUNET_HashCode * key, uint32_t size, 874check_present (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
875 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 875 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
876 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 876 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
877 uint64_t uid) 877 uint64_t uid)
@@ -930,7 +930,7 @@ handle_put (void *cls, struct GNUNET_SERVER_Client *client,
930 int rid; 930 int rid;
931 struct ReservationList *pos; 931 struct ReservationList *pos;
932 struct PutContext *pc; 932 struct PutContext *pc;
933 GNUNET_HashCode vhash; 933 struct GNUNET_HashCode vhash;
934 uint32_t size; 934 uint32_t size;
935 935
936 if ((dm == NULL) || (ntohl (dm->type) == 0)) 936 if ((dm == NULL) || (ntohl (dm->type) == 0))
@@ -993,7 +993,7 @@ handle_get (void *cls, struct GNUNET_SERVER_Client *client,
993 993
994 size = ntohs (message->size); 994 size = ntohs (message->size);
995 if ((size != sizeof (struct GetMessage)) && 995 if ((size != sizeof (struct GetMessage)) &&
996 (size != sizeof (struct GetMessage) - sizeof (GNUNET_HashCode))) 996 (size != sizeof (struct GetMessage) - sizeof (struct GNUNET_HashCode)))
997 { 997 {
998 GNUNET_break (0); 998 GNUNET_break (0);
999 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 999 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
@@ -1120,7 +1120,7 @@ handle_get_zero_anonymity (void *cls, struct GNUNET_SERVER_Client *client,
1120 * in to be deleted (by returning GNUNET_NO). 1120 * in to be deleted (by returning GNUNET_NO).
1121 */ 1121 */
1122static int 1122static int
1123remove_callback (void *cls, const GNUNET_HashCode * key, uint32_t size, 1123remove_callback (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
1124 const void *data, enum GNUNET_BLOCK_Type type, 1124 const void *data, enum GNUNET_BLOCK_Type type,
1125 uint32_t priority, uint32_t anonymity, 1125 uint32_t priority, uint32_t anonymity,
1126 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 1126 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -1160,7 +1160,7 @@ handle_remove (void *cls, struct GNUNET_SERVER_Client *client,
1160 const struct GNUNET_MessageHeader *message) 1160 const struct GNUNET_MessageHeader *message)
1161{ 1161{
1162 const struct DataMessage *dm = check_data (message); 1162 const struct DataMessage *dm = check_data (message);
1163 GNUNET_HashCode vhash; 1163 struct GNUNET_HashCode vhash;
1164 1164
1165 if (dm == NULL) 1165 if (dm == NULL)
1166 { 1166 {
@@ -1428,7 +1428,7 @@ cleanup_reservations (void *cls, struct GNUNET_SERVER_Client *client)
1428 */ 1428 */
1429static void 1429static void
1430add_key_to_bloomfilter (void *cls, 1430add_key_to_bloomfilter (void *cls,
1431 const GNUNET_HashCode *key, 1431 const struct GNUNET_HashCode *key,
1432 unsigned int count) 1432 unsigned int count)
1433{ 1433{
1434 struct GNUNET_CONTAINER_BloomFilter *bf = cls; 1434 struct GNUNET_CONTAINER_BloomFilter *bf = cls;
diff --git a/src/datastore/perf_datastore_api.c b/src/datastore/perf_datastore_api.c
index 09064ceb0..6b7a73640 100644
--- a/src/datastore/perf_datastore_api.c
+++ b/src/datastore/perf_datastore_api.c
@@ -171,7 +171,7 @@ remove_next (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration,
171 171
172 172
173static void 173static void
174delete_value (void *cls, const GNUNET_HashCode * key, size_t size, 174delete_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
175 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 175 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
176 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 176 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
177 uint64_t uid) 177 uint64_t uid)
@@ -196,7 +196,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
196{ 196{
197 struct CpsRunContext *crc = cls; 197 struct CpsRunContext *crc = cls;
198 size_t size; 198 size_t size;
199 static GNUNET_HashCode key; 199 static struct GNUNET_HashCode key;
200 static char data[65536]; 200 static char data[65536];
201 int i; 201 int i;
202 int k; 202 int k;
@@ -206,7 +206,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
206 switch (crc->phase) 206 switch (crc->phase)
207 { 207 {
208 case RP_PUT: 208 case RP_PUT:
209 memset (&key, 256 - crc->i, sizeof (GNUNET_HashCode)); 209 memset (&key, 256 - crc->i, sizeof (struct GNUNET_HashCode));
210 i = crc->j; 210 i = crc->j;
211 k = crc->i; 211 k = crc->i;
212 /* most content is 32k */ 212 /* most content is 32k */
@@ -214,7 +214,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
214 if (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) == 0) /* but some of it is less! */ 214 if (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 16) == 0) /* but some of it is less! */
215 size = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 32 * 1024); 215 size = GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, 32 * 1024);
216 crc->size = size = size - (size & 7); /* always multiple of 8 */ 216 crc->size = size = size - (size & 7); /* always multiple of 8 */
217 GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key); 217 GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &key);
218 memset (data, i, size); 218 memset (data, i, size);
219 if (i > 255) 219 if (i > 255)
220 memset (data, i - 255, size / 2); 220 memset (data, i - 255, size / 2);
@@ -298,7 +298,7 @@ run (void *cls,
298 const struct GNUNET_CONFIGURATION_Handle *cfg) 298 const struct GNUNET_CONFIGURATION_Handle *cfg)
299{ 299{
300 struct CpsRunContext *crc; 300 struct CpsRunContext *crc;
301 static GNUNET_HashCode zkey; 301 static struct GNUNET_HashCode zkey;
302 302
303 datastore = GNUNET_DATASTORE_connect (cfg); 303 datastore = GNUNET_DATASTORE_connect (cfg);
304 start_time = GNUNET_TIME_absolute_get (); 304 start_time = GNUNET_TIME_absolute_get ();
diff --git a/src/datastore/perf_plugin_datastore.c b/src/datastore/perf_plugin_datastore.c
index 4b1bdabde..fec090571 100644
--- a/src/datastore/perf_plugin_datastore.c
+++ b/src/datastore/perf_plugin_datastore.c
@@ -103,7 +103,7 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
103{ 103{
104 char value[65536]; 104 char value[65536];
105 size_t size; 105 size_t size;
106 static GNUNET_HashCode key; 106 static struct GNUNET_HashCode key;
107 static int ic; 107 static int ic;
108 char *msg; 108 char *msg;
109 unsigned int prio; 109 unsigned int prio;
@@ -116,7 +116,7 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
116 116
117 /* generate random key */ 117 /* generate random key */
118 key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().abs_value; 118 key.bits[0] = (unsigned int) GNUNET_TIME_absolute_get ().abs_value;
119 GNUNET_CRYPTO_hash (&key, sizeof (GNUNET_HashCode), &key); 119 GNUNET_CRYPTO_hash (&key, sizeof (struct GNUNET_HashCode), &key);
120 memset (value, i, size); 120 memset (value, i, size);
121 if (i > 255) 121 if (i > 255)
122 memset (value, i - 255, size / 2); 122 memset (value, i - 255, size / 2);
@@ -149,7 +149,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
149 149
150 150
151static int 151static int
152iterate_zeros (void *cls, const GNUNET_HashCode * key, uint32_t size, 152iterate_zeros (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
153 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 153 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
154 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 154 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
155 uint64_t uid) 155 uint64_t uid)
@@ -196,7 +196,7 @@ iterate_zeros (void *cls, const GNUNET_HashCode * key, uint32_t size,
196 196
197 197
198static int 198static int
199expiration_get (void *cls, const GNUNET_HashCode * key, uint32_t size, 199expiration_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
200 const void *data, enum GNUNET_BLOCK_Type type, 200 const void *data, enum GNUNET_BLOCK_Type type,
201 uint32_t priority, uint32_t anonymity, 201 uint32_t priority, uint32_t anonymity,
202 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 202 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -241,7 +241,7 @@ expiration_get (void *cls, const GNUNET_HashCode * key, uint32_t size,
241 241
242 242
243static int 243static int
244replication_get (void *cls, const GNUNET_HashCode * key, uint32_t size, 244replication_get (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
245 const void *data, enum GNUNET_BLOCK_Type type, 245 const void *data, enum GNUNET_BLOCK_Type type,
246 uint32_t priority, uint32_t anonymity, 246 uint32_t priority, uint32_t anonymity,
247 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 247 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
diff --git a/src/datastore/plugin_datastore_mysql.c b/src/datastore/plugin_datastore_mysql.c
index ed7741cfc..b92877d98 100644
--- a/src/datastore/plugin_datastore_mysql.c
+++ b/src/datastore/plugin_datastore_mysql.c
@@ -281,7 +281,7 @@ mysql_plugin_estimate_size (void *cls)
281 * @return GNUNET_OK on success 281 * @return GNUNET_OK on success
282 */ 282 */
283static int 283static int
284mysql_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, 284mysql_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
285 const void *data, enum GNUNET_BLOCK_Type type, 285 const void *data, enum GNUNET_BLOCK_Type type,
286 uint32_t priority, uint32_t anonymity, uint32_t replication, 286 uint32_t priority, uint32_t anonymity, uint32_t replication,
287 struct GNUNET_TIME_Absolute expiration, char **msg) 287 struct GNUNET_TIME_Absolute expiration, char **msg)
@@ -297,15 +297,15 @@ mysql_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
297 unsigned long hashSize; 297 unsigned long hashSize;
298 unsigned long hashSize2; 298 unsigned long hashSize2;
299 unsigned long lsize; 299 unsigned long lsize;
300 GNUNET_HashCode vhash; 300 struct GNUNET_HashCode vhash;
301 301
302 if (size > MAX_DATUM_SIZE) 302 if (size > MAX_DATUM_SIZE)
303 { 303 {
304 GNUNET_break (0); 304 GNUNET_break (0);
305 return GNUNET_SYSERR; 305 return GNUNET_SYSERR;
306 } 306 }
307 hashSize = sizeof (GNUNET_HashCode); 307 hashSize = sizeof (struct GNUNET_HashCode);
308 hashSize2 = sizeof (GNUNET_HashCode); 308 hashSize2 = sizeof (struct GNUNET_HashCode);
309 lsize = size; 309 lsize = size;
310 GNUNET_CRYPTO_hash (data, size, &vhash); 310 GNUNET_CRYPTO_hash (data, size, &vhash);
311 if (GNUNET_OK != 311 if (GNUNET_OK !=
@@ -403,11 +403,11 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
403 unsigned long size; 403 unsigned long size;
404 unsigned long long uid; 404 unsigned long long uid;
405 char value[GNUNET_DATASTORE_MAX_VALUE_SIZE]; 405 char value[GNUNET_DATASTORE_MAX_VALUE_SIZE];
406 GNUNET_HashCode key; 406 struct GNUNET_HashCode key;
407 struct GNUNET_TIME_Absolute expiration; 407 struct GNUNET_TIME_Absolute expiration;
408 MYSQL_BIND rbind[7]; 408 MYSQL_BIND rbind[7];
409 409
410 hashSize = sizeof (GNUNET_HashCode); 410 hashSize = sizeof (struct GNUNET_HashCode);
411 memset (rbind, 0, sizeof (rbind)); 411 memset (rbind, 0, sizeof (rbind));
412 rbind[0].buffer_type = MYSQL_TYPE_LONG; 412 rbind[0].buffer_type = MYSQL_TYPE_LONG;
413 rbind[0].buffer = &type; 413 rbind[0].buffer = &type;
@@ -442,8 +442,8 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
442 return; 442 return;
443 } 443 }
444 GNUNET_assert (size <= sizeof (value)); 444 GNUNET_assert (size <= sizeof (value));
445 if ((rbind[4].buffer_length != sizeof (GNUNET_HashCode)) || 445 if ((rbind[4].buffer_length != sizeof (struct GNUNET_HashCode)) ||
446 (hashSize != sizeof (GNUNET_HashCode))) 446 (hashSize != sizeof (struct GNUNET_HashCode)))
447 { 447 {
448 GNUNET_break (0); 448 GNUNET_break (0);
449 proc (proc_cls, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0); 449 proc (proc_cls, NULL, 0, NULL, 0, 0, 0, GNUNET_TIME_UNIT_ZERO_ABS, 0);
@@ -486,8 +486,8 @@ execute_select (struct Plugin *plugin, struct GNUNET_MYSQL_StatementHandle *stmt
486 * @param proc_cls closure for proc 486 * @param proc_cls closure for proc
487 */ 487 */
488static void 488static void
489mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key, 489mysql_plugin_get_key (void *cls, uint64_t offset, const struct GNUNET_HashCode * key,
490 const GNUNET_HashCode * vhash, 490 const struct GNUNET_HashCode * vhash,
491 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, 491 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
492 void *proc_cls) 492 void *proc_cls)
493{ 493{
@@ -501,8 +501,8 @@ mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
501 501
502 GNUNET_assert (key != NULL); 502 GNUNET_assert (key != NULL);
503 GNUNET_assert (NULL != proc); 503 GNUNET_assert (NULL != proc);
504 hashSize = sizeof (GNUNET_HashCode); 504 hashSize = sizeof (struct GNUNET_HashCode);
505 hashSize2 = sizeof (GNUNET_HashCode); 505 hashSize2 = sizeof (struct GNUNET_HashCode);
506 memset (cbind, 0, sizeof (cbind)); 506 memset (cbind, 0, sizeof (cbind));
507 total = -1; 507 total = -1;
508 cbind[0].buffer_type = MYSQL_TYPE_LONGLONG; 508 cbind[0].buffer_type = MYSQL_TYPE_LONGLONG;
@@ -669,7 +669,7 @@ struct ReplCtx
669 * GNUNET_NO to delete the item and continue (if supported) 669 * GNUNET_NO to delete the item and continue (if supported)
670 */ 670 */
671static int 671static int
672repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, 672repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
673 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 673 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
674 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 674 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
675 uint64_t uid) 675 uint64_t uid)
@@ -763,7 +763,7 @@ mysql_plugin_get_keys (void *cls,
763 const char *query = "SELECT hash FROM gn090"; 763 const char *query = "SELECT hash FROM gn090";
764 int ret; 764 int ret;
765 MYSQL_STMT *statement; 765 MYSQL_STMT *statement;
766 GNUNET_HashCode key; 766 struct GNUNET_HashCode key;
767 MYSQL_BIND cbind[1]; 767 MYSQL_BIND cbind[1];
768 unsigned long length; 768 unsigned long length;
769 769
@@ -808,7 +808,7 @@ mysql_plugin_get_keys (void *cls,
808 } 808 }
809 while (0 == (ret = mysql_stmt_fetch (statement))) 809 while (0 == (ret = mysql_stmt_fetch (statement)))
810 { 810 {
811 if (sizeof (GNUNET_HashCode) == length) 811 if (sizeof (struct GNUNET_HashCode) == length)
812 proc (proc_cls, &key, 1); 812 proc (proc_cls, &key, 1);
813 } 813 }
814 if (ret != MYSQL_NO_DATA) 814 if (ret != MYSQL_NO_DATA)
@@ -869,7 +869,7 @@ struct ExpiCtx
869 * GNUNET_NO to delete the item and continue (if supported) 869 * GNUNET_NO to delete the item and continue (if supported)
870 */ 870 */
871static int 871static int
872expi_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, 872expi_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
873 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 873 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
874 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 874 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
875 uint64_t uid) 875 uint64_t uid)
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c
index 6dec3146d..83fc423da 100644
--- a/src/datastore/plugin_datastore_postgres.c
+++ b/src/datastore/plugin_datastore_postgres.c
@@ -270,14 +270,14 @@ postgres_plugin_estimate_size (void *cls)
270 * @return GNUNET_OK on success 270 * @return GNUNET_OK on success
271 */ 271 */
272static int 272static int
273postgres_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, 273postgres_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
274 const void *data, enum GNUNET_BLOCK_Type type, 274 const void *data, enum GNUNET_BLOCK_Type type,
275 uint32_t priority, uint32_t anonymity, 275 uint32_t priority, uint32_t anonymity,
276 uint32_t replication, 276 uint32_t replication,
277 struct GNUNET_TIME_Absolute expiration, char **msg) 277 struct GNUNET_TIME_Absolute expiration, char **msg)
278{ 278{
279 struct Plugin *plugin = cls; 279 struct Plugin *plugin = cls;
280 GNUNET_HashCode vhash; 280 struct GNUNET_HashCode vhash;
281 PGresult *ret; 281 PGresult *ret;
282 uint32_t btype = htonl (type); 282 uint32_t btype = htonl (type);
283 uint32_t bprio = htonl (priority); 283 uint32_t bprio = htonl (priority);
@@ -301,8 +301,8 @@ postgres_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
301 sizeof (bprio), 301 sizeof (bprio),
302 sizeof (banon), 302 sizeof (banon),
303 sizeof (bexpi), 303 sizeof (bexpi),
304 sizeof (GNUNET_HashCode), 304 sizeof (struct GNUNET_HashCode),
305 sizeof (GNUNET_HashCode), 305 sizeof (struct GNUNET_HashCode),
306 size 306 size
307 }; 307 };
308 const int paramFormats[] = { 1, 1, 1, 1, 1, 1, 1, 1 }; 308 const int paramFormats[] = { 1, 1, 1, 1, 1, 1, 1, 1 };
@@ -345,7 +345,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
345 uint32_t size; 345 uint32_t size;
346 unsigned int rowid; 346 unsigned int rowid;
347 struct GNUNET_TIME_Absolute expiration_time; 347 struct GNUNET_TIME_Absolute expiration_time;
348 GNUNET_HashCode key; 348 struct GNUNET_HashCode key;
349 349
350 if (GNUNET_OK != 350 if (GNUNET_OK !=
351 GNUNET_POSTGRES_check_result_ (plugin->dbh, res, PGRES_TUPLES_OK, "PQexecPrepared", "select", 351 GNUNET_POSTGRES_check_result_ (plugin->dbh, res, PGRES_TUPLES_OK, "PQexecPrepared", "select",
@@ -380,7 +380,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
380 (sizeof (uint32_t) != PQfsize (res, 1)) || 380 (sizeof (uint32_t) != PQfsize (res, 1)) ||
381 (sizeof (uint32_t) != PQfsize (res, 2)) || 381 (sizeof (uint32_t) != PQfsize (res, 2)) ||
382 (sizeof (uint64_t) != PQfsize (res, 3)) || 382 (sizeof (uint64_t) != PQfsize (res, 3)) ||
383 (sizeof (GNUNET_HashCode) != PQgetlength (res, 0, 4))) 383 (sizeof (struct GNUNET_HashCode) != PQgetlength (res, 0, 4)))
384 { 384 {
385 GNUNET_break (0); 385 GNUNET_break (0);
386 PQclear (res); 386 PQclear (res);
@@ -394,7 +394,7 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
394 anonymity = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2)); 394 anonymity = ntohl (*(uint32_t *) PQgetvalue (res, 0, 2));
395 expiration_time.abs_value = 395 expiration_time.abs_value =
396 GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3)); 396 GNUNET_ntohll (*(uint64_t *) PQgetvalue (res, 0, 3));
397 memcpy (&key, PQgetvalue (res, 0, 4), sizeof (GNUNET_HashCode)); 397 memcpy (&key, PQgetvalue (res, 0, 4), sizeof (struct GNUNET_HashCode));
398 size = PQgetlength (res, 0, 5); 398 size = PQgetlength (res, 0, 5);
399 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "datastore-postgres", 399 GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "datastore-postgres",
400 "Found result of size %u bytes and type %u in database\n", 400 "Found result of size %u bytes and type %u in database\n",
@@ -443,8 +443,8 @@ process_result (struct Plugin *plugin, PluginDatumProcessor proc,
443 */ 443 */
444static void 444static void
445postgres_plugin_get_key (void *cls, uint64_t offset, 445postgres_plugin_get_key (void *cls, uint64_t offset,
446 const GNUNET_HashCode * key, 446 const struct GNUNET_HashCode * key,
447 const GNUNET_HashCode * vhash, 447 const struct GNUNET_HashCode * vhash,
448 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, 448 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
449 void *proc_cls) 449 void *proc_cls)
450{ 450{
@@ -461,14 +461,14 @@ postgres_plugin_get_key (void *cls, uint64_t offset,
461 461
462 GNUNET_assert (key != NULL); 462 GNUNET_assert (key != NULL);
463 paramValues[0] = (const char *) key; 463 paramValues[0] = (const char *) key;
464 paramLengths[0] = sizeof (GNUNET_HashCode); 464 paramLengths[0] = sizeof (struct GNUNET_HashCode);
465 btype = htonl (type); 465 btype = htonl (type);
466 if (type != 0) 466 if (type != 0)
467 { 467 {
468 if (vhash != NULL) 468 if (vhash != NULL)
469 { 469 {
470 paramValues[1] = (const char *) vhash; 470 paramValues[1] = (const char *) vhash;
471 paramLengths[1] = sizeof (GNUNET_HashCode); 471 paramLengths[1] = sizeof (struct GNUNET_HashCode);
472 paramValues[2] = (const char *) &btype; 472 paramValues[2] = (const char *) &btype;
473 paramLengths[2] = sizeof (btype); 473 paramLengths[2] = sizeof (btype);
474 paramValues[3] = (const char *) &blimit_off; 474 paramValues[3] = (const char *) &blimit_off;
@@ -499,7 +499,7 @@ postgres_plugin_get_key (void *cls, uint64_t offset,
499 if (vhash != NULL) 499 if (vhash != NULL)
500 { 500 {
501 paramValues[1] = (const char *) vhash; 501 paramValues[1] = (const char *) vhash;
502 paramLengths[1] = sizeof (GNUNET_HashCode); 502 paramLengths[1] = sizeof (struct GNUNET_HashCode);
503 paramValues[2] = (const char *) &blimit_off; 503 paramValues[2] = (const char *) &blimit_off;
504 paramLengths[2] = sizeof (blimit_off); 504 paramLengths[2] = sizeof (blimit_off);
505 nparams = 3; 505 nparams = 3;
@@ -628,7 +628,7 @@ struct ReplCtx
628 * GNUNET_NO to delete the item and continue (if supported) 628 * GNUNET_NO to delete the item and continue (if supported)
629 */ 629 */
630static int 630static int
631repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, 631repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
632 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 632 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
633 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 633 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
634 uint64_t uid) 634 uint64_t uid)
@@ -792,16 +792,16 @@ postgres_plugin_get_keys (void *cls,
792 struct Plugin *plugin = cls; 792 struct Plugin *plugin = cls;
793 int ret; 793 int ret;
794 int i; 794 int i;
795 GNUNET_HashCode key; 795 struct GNUNET_HashCode key;
796 PGresult * res; 796 PGresult * res;
797 797
798 res = PQexecPrepared (plugin->dbh, "get_keys", 0, NULL, NULL, NULL, 1); 798 res = PQexecPrepared (plugin->dbh, "get_keys", 0, NULL, NULL, NULL, 1);
799 ret = PQntuples (res); 799 ret = PQntuples (res);
800 for (i=0;i<ret;i++) 800 for (i=0;i<ret;i++)
801 { 801 {
802 if (sizeof (GNUNET_HashCode) != PQgetlength (res, i, 0)) 802 if (sizeof (struct GNUNET_HashCode) != PQgetlength (res, i, 0))
803 { 803 {
804 memcpy (&key, PQgetvalue (res, i, 0), sizeof (GNUNET_HashCode)); 804 memcpy (&key, PQgetvalue (res, i, 0), sizeof (struct GNUNET_HashCode));
805 proc (proc_cls, &key, 1); 805 proc (proc_cls, &key, 1);
806 } 806 }
807 } 807 }
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index 00195fb13..40b4de33e 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -480,7 +480,7 @@ delete_by_rowid (struct Plugin *plugin, unsigned long long rid)
480 * @return GNUNET_OK on success 480 * @return GNUNET_OK on success
481 */ 481 */
482static int 482static int
483sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, 483sqlite_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
484 const void *data, enum GNUNET_BLOCK_Type type, 484 const void *data, enum GNUNET_BLOCK_Type type,
485 uint32_t priority, uint32_t anonymity, uint32_t replication, 485 uint32_t priority, uint32_t anonymity, uint32_t replication,
486 struct GNUNET_TIME_Absolute expiration, char **msg) 486 struct GNUNET_TIME_Absolute expiration, char **msg)
@@ -489,7 +489,7 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
489 int n; 489 int n;
490 int ret; 490 int ret;
491 sqlite3_stmt *stmt; 491 sqlite3_stmt *stmt;
492 GNUNET_HashCode vhash; 492 struct GNUNET_HashCode vhash;
493 uint64_t rvalue; 493 uint64_t rvalue;
494 494
495 if (size > MAX_ITEM_SIZE) 495 if (size > MAX_ITEM_SIZE)
@@ -510,10 +510,10 @@ sqlite_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
510 (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.abs_value)) || 510 (SQLITE_OK != sqlite3_bind_int64 (stmt, 5, expiration.abs_value)) ||
511 (SQLITE_OK != sqlite3_bind_int64 (stmt, 6, rvalue)) || 511 (SQLITE_OK != sqlite3_bind_int64 (stmt, 6, rvalue)) ||
512 (SQLITE_OK != 512 (SQLITE_OK !=
513 sqlite3_bind_blob (stmt, 7, key, sizeof (GNUNET_HashCode), 513 sqlite3_bind_blob (stmt, 7, key, sizeof (struct GNUNET_HashCode),
514 SQLITE_TRANSIENT)) || 514 SQLITE_TRANSIENT)) ||
515 (SQLITE_OK != 515 (SQLITE_OK !=
516 sqlite3_bind_blob (stmt, 8, &vhash, sizeof (GNUNET_HashCode), 516 sqlite3_bind_blob (stmt, 8, &vhash, sizeof (struct GNUNET_HashCode),
517 SQLITE_TRANSIENT)) || 517 SQLITE_TRANSIENT)) ||
518 (SQLITE_OK != sqlite3_bind_blob (stmt, 9, data, size, SQLITE_TRANSIENT))) 518 (SQLITE_OK != sqlite3_bind_blob (stmt, 9, data, size, SQLITE_TRANSIENT)))
519 { 519 {
@@ -648,7 +648,7 @@ execute_get (struct Plugin *plugin, sqlite3_stmt * stmt,
648 case SQLITE_ROW: 648 case SQLITE_ROW:
649 size = sqlite3_column_bytes (stmt, 5); 649 size = sqlite3_column_bytes (stmt, 5);
650 rowid = sqlite3_column_int64 (stmt, 6); 650 rowid = sqlite3_column_int64 (stmt, 6);
651 if (sqlite3_column_bytes (stmt, 4) != sizeof (GNUNET_HashCode)) 651 if (sqlite3_column_bytes (stmt, 4) != sizeof (struct GNUNET_HashCode))
652 { 652 {
653 GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "sqlite", 653 GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "sqlite",
654 _ 654 _
@@ -768,8 +768,8 @@ sqlite_plugin_get_zero_anonymity (void *cls, uint64_t offset,
768 * @param proc_cls closure for proc 768 * @param proc_cls closure for proc
769 */ 769 */
770static void 770static void
771sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key, 771sqlite_plugin_get_key (void *cls, uint64_t offset, const struct GNUNET_HashCode * key,
772 const GNUNET_HashCode * vhash, 772 const struct GNUNET_HashCode * vhash,
773 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, 773 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
774 void *proc_cls) 774 void *proc_cls)
775{ 775{
@@ -796,11 +796,11 @@ sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
796 } 796 }
797 sqoff = 1; 797 sqoff = 1;
798 ret = 798 ret =
799 sqlite3_bind_blob (stmt, sqoff++, key, sizeof (GNUNET_HashCode), 799 sqlite3_bind_blob (stmt, sqoff++, key, sizeof (struct GNUNET_HashCode),
800 SQLITE_TRANSIENT); 800 SQLITE_TRANSIENT);
801 if ((vhash != NULL) && (ret == SQLITE_OK)) 801 if ((vhash != NULL) && (ret == SQLITE_OK))
802 ret = 802 ret =
803 sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (GNUNET_HashCode), 803 sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (struct GNUNET_HashCode),
804 SQLITE_TRANSIENT); 804 SQLITE_TRANSIENT);
805 if ((type != 0) && (ret == SQLITE_OK)) 805 if ((type != 0) && (ret == SQLITE_OK))
806 ret = sqlite3_bind_int (stmt, sqoff++, type); 806 ret = sqlite3_bind_int (stmt, sqoff++, type);
@@ -845,11 +845,11 @@ sqlite_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
845 } 845 }
846 sqoff = 1; 846 sqoff = 1;
847 ret = 847 ret =
848 sqlite3_bind_blob (stmt, sqoff++, key, sizeof (GNUNET_HashCode), 848 sqlite3_bind_blob (stmt, sqoff++, key, sizeof (struct GNUNET_HashCode),
849 SQLITE_TRANSIENT); 849 SQLITE_TRANSIENT);
850 if ((vhash != NULL) && (ret == SQLITE_OK)) 850 if ((vhash != NULL) && (ret == SQLITE_OK))
851 ret = 851 ret =
852 sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (GNUNET_HashCode), 852 sqlite3_bind_blob (stmt, sqoff++, vhash, sizeof (struct GNUNET_HashCode),
853 SQLITE_TRANSIENT); 853 SQLITE_TRANSIENT);
854 if ((type != 0) && (ret == SQLITE_OK)) 854 if ((type != 0) && (ret == SQLITE_OK))
855 ret = sqlite3_bind_int (stmt, sqoff++, type); 855 ret = sqlite3_bind_int (stmt, sqoff++, type);
@@ -916,7 +916,7 @@ struct ReplCtx
916 * GNUNET_NO to delete the item 916 * GNUNET_NO to delete the item
917 */ 917 */
918static int 918static int
919repl_proc (void *cls, const GNUNET_HashCode * key, uint32_t size, 919repl_proc (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
920 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 920 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
921 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 921 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
922 uint64_t uid) 922 uint64_t uid)
@@ -1076,7 +1076,7 @@ sqlite_plugin_get_keys (void *cls,
1076 void *proc_cls) 1076 void *proc_cls)
1077{ 1077{
1078 struct Plugin *plugin = cls; 1078 struct Plugin *plugin = cls;
1079 const GNUNET_HashCode *key; 1079 const struct GNUNET_HashCode *key;
1080 sqlite3_stmt *stmt; 1080 sqlite3_stmt *stmt;
1081 int ret; 1081 int ret;
1082 1082
@@ -1090,7 +1090,7 @@ sqlite_plugin_get_keys (void *cls,
1090 while (SQLITE_ROW == (ret = sqlite3_step (stmt))) 1090 while (SQLITE_ROW == (ret = sqlite3_step (stmt)))
1091 { 1091 {
1092 key = sqlite3_column_blob (stmt, 1); 1092 key = sqlite3_column_blob (stmt, 1);
1093 if (sizeof (GNUNET_HashCode) == sqlite3_column_bytes (stmt, 1)) 1093 if (sizeof (struct GNUNET_HashCode) == sqlite3_column_bytes (stmt, 1))
1094 proc (proc_cls, key, 1); 1094 proc (proc_cls, key, 1);
1095 } 1095 }
1096 if (SQLITE_DONE != ret) 1096 if (SQLITE_DONE != ret)
diff --git a/src/datastore/plugin_datastore_template.c b/src/datastore/plugin_datastore_template.c
index 174d3d255..1e30abe18 100644
--- a/src/datastore/plugin_datastore_template.c
+++ b/src/datastore/plugin_datastore_template.c
@@ -71,7 +71,7 @@ template_plugin_estimate_size (void *cls)
71 * @return GNUNET_OK on success 71 * @return GNUNET_OK on success
72 */ 72 */
73static int 73static int
74template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size, 74template_plugin_put (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
75 const void *data, enum GNUNET_BLOCK_Type type, 75 const void *data, enum GNUNET_BLOCK_Type type,
76 uint32_t priority, uint32_t anonymity, 76 uint32_t priority, uint32_t anonymity,
77 uint32_t replication, 77 uint32_t replication,
@@ -103,8 +103,8 @@ template_plugin_put (void *cls, const GNUNET_HashCode * key, uint32_t size,
103 */ 103 */
104static void 104static void
105template_plugin_get_key (void *cls, uint64_t offset, 105template_plugin_get_key (void *cls, uint64_t offset,
106 const GNUNET_HashCode * key, 106 const struct GNUNET_HashCode * key,
107 const GNUNET_HashCode * vhash, 107 const struct GNUNET_HashCode * vhash,
108 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, 108 enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc,
109 void *proc_cls) 109 void *proc_cls)
110{ 110{
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index 374067ca0..3f8f87cae 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -119,7 +119,7 @@ enum RunPhase
119 119
120struct CpsRunContext 120struct CpsRunContext
121{ 121{
122 GNUNET_HashCode key; 122 struct GNUNET_HashCode key;
123 int i; 123 int i;
124 int rid; 124 int rid;
125 const struct GNUNET_CONFIGURATION_Handle *cfg; 125 const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -171,7 +171,7 @@ get_reserved (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration
171 171
172 172
173static void 173static void
174check_value (void *cls, const GNUNET_HashCode * key, size_t size, 174check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
175 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 175 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
176 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 176 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
177 uint64_t uid) 177 uint64_t uid)
@@ -217,7 +217,7 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size,
217 217
218 218
219static void 219static void
220delete_value (void *cls, const GNUNET_HashCode * key, size_t size, 220delete_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
221 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 221 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
222 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 222 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
223 uint64_t uid) 223 uint64_t uid)
@@ -237,7 +237,7 @@ delete_value (void *cls, const GNUNET_HashCode * key, size_t size,
237 237
238 238
239static void 239static void
240check_nothing (void *cls, const GNUNET_HashCode * key, size_t size, 240check_nothing (void *cls, const struct GNUNET_HashCode * key, size_t size,
241 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 241 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
242 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 242 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
243 uint64_t uid) 243 uint64_t uid)
@@ -253,7 +253,7 @@ check_nothing (void *cls, const GNUNET_HashCode * key, size_t size,
253 253
254 254
255static void 255static void
256check_multiple (void *cls, const GNUNET_HashCode * key, size_t size, 256check_multiple (void *cls, const struct GNUNET_HashCode * key, size_t size,
257 const void *data, enum GNUNET_BLOCK_Type type, 257 const void *data, enum GNUNET_BLOCK_Type type,
258 uint32_t priority, uint32_t anonymity, 258 uint32_t priority, uint32_t anonymity,
259 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 259 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -285,7 +285,7 @@ check_multiple (void *cls, const GNUNET_HashCode * key, size_t size,
285 285
286 286
287static void 287static void
288check_update (void *cls, const GNUNET_HashCode * key, size_t size, 288check_update (void *cls, const struct GNUNET_HashCode * key, size_t size,
289 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 289 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
290 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 290 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
291 uint64_t uid) 291 uint64_t uid)
@@ -467,7 +467,7 @@ run (void *cls,
467 const struct GNUNET_CONFIGURATION_Handle *cfg) 467 const struct GNUNET_CONFIGURATION_Handle *cfg)
468{ 468{
469 struct CpsRunContext *crc; 469 struct CpsRunContext *crc;
470 static GNUNET_HashCode zkey; 470 static struct GNUNET_HashCode zkey;
471 471
472 crc = GNUNET_malloc (sizeof (struct CpsRunContext)); 472 crc = GNUNET_malloc (sizeof (struct CpsRunContext));
473 crc->cfg = cfg; 473 crc->cfg = cfg;
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index bbb954304..4766c03eb 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -51,7 +51,7 @@ enum RunPhase
51 51
52struct CpsRunContext 52struct CpsRunContext
53{ 53{
54 GNUNET_HashCode key; 54 struct GNUNET_HashCode key;
55 int i; 55 int i;
56 int found; 56 int found;
57 const struct GNUNET_CONFIGURATION_Handle *cfg; 57 const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -138,7 +138,7 @@ check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiratio
138 138
139 139
140static void 140static void
141check_value (void *cls, const GNUNET_HashCode * key, size_t size, 141check_value (void *cls, const struct GNUNET_HashCode * key, size_t size,
142 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 142 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
143 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 143 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
144 uint64_t uid) 144 uint64_t uid)
@@ -170,7 +170,7 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size,
170 170
171 171
172static void 172static void
173check_nothing (void *cls, const GNUNET_HashCode * key, size_t size, 173check_nothing (void *cls, const struct GNUNET_HashCode * key, size_t size,
174 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, 174 const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority,
175 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration, 175 uint32_t anonymity, struct GNUNET_TIME_Absolute expiration,
176 uint64_t uid) 176 uint64_t uid)
@@ -262,7 +262,7 @@ run (void *cls,
262 const struct GNUNET_CONFIGURATION_Handle *cfg) 262 const struct GNUNET_CONFIGURATION_Handle *cfg)
263{ 263{
264 struct CpsRunContext *crc; 264 struct CpsRunContext *crc;
265 static GNUNET_HashCode zkey; 265 static struct GNUNET_HashCode zkey;
266 266
267 crc = GNUNET_malloc (sizeof (struct CpsRunContext)); 267 crc = GNUNET_malloc (sizeof (struct CpsRunContext));
268 crc->cfg = cfg; 268 crc->cfg = cfg;
diff --git a/src/datastore/test_plugin_datastore.c b/src/datastore/test_plugin_datastore.c
index a228e1004..96a5aebe5 100644
--- a/src/datastore/test_plugin_datastore.c
+++ b/src/datastore/test_plugin_datastore.c
@@ -84,11 +84,11 @@ disk_utilization_change_cb (void *cls, int delta)
84 84
85 85
86static void 86static void
87gen_key (int i, GNUNET_HashCode * key) 87gen_key (int i, struct GNUNET_HashCode * key)
88{ 88{
89 memset (key, 0, sizeof (GNUNET_HashCode)); 89 memset (key, 0, sizeof (struct GNUNET_HashCode));
90 key->bits[0] = (unsigned int) i; 90 key->bits[0] = (unsigned int) i;
91 GNUNET_CRYPTO_hash (key, sizeof (GNUNET_HashCode), key); 91 GNUNET_CRYPTO_hash (key, sizeof (struct GNUNET_HashCode), key);
92} 92}
93 93
94 94
@@ -97,7 +97,7 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
97{ 97{
98 char value[65536]; 98 char value[65536];
99 size_t size; 99 size_t size;
100 GNUNET_HashCode key; 100 struct GNUNET_HashCode key;
101 char *msg; 101 char *msg;
102 unsigned int prio; 102 unsigned int prio;
103 103
@@ -147,7 +147,7 @@ static uint64_t guid;
147 147
148 148
149static int 149static int
150iterate_one_shot (void *cls, const GNUNET_HashCode * key, uint32_t size, 150iterate_one_shot (void *cls, const struct GNUNET_HashCode * key, uint32_t size,
151 const void *data, enum GNUNET_BLOCK_Type type, 151 const void *data, enum GNUNET_BLOCK_Type type,
152 uint32_t priority, uint32_t anonymity, 152 uint32_t priority, uint32_t anonymity,
153 struct GNUNET_TIME_Absolute expiration, uint64_t uid) 153 struct GNUNET_TIME_Absolute expiration, uint64_t uid)
@@ -218,7 +218,7 @@ test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
218 int j; 218 int j;
219 unsigned long long os; 219 unsigned long long os;
220 unsigned long long cs; 220 unsigned long long cs;
221 GNUNET_HashCode key; 221 struct GNUNET_HashCode key;
222 222
223 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 223 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
224 { 224 {