diff options
Diffstat (limited to 'src/fs/gnunet-service-fs_indexing.c')
-rw-r--r-- | src/fs/gnunet-service-fs_indexing.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/fs/gnunet-service-fs_indexing.c b/src/fs/gnunet-service-fs_indexing.c index e45289484..60dd1c131 100644 --- a/src/fs/gnunet-service-fs_indexing.c +++ b/src/fs/gnunet-service-fs_indexing.c | |||
@@ -67,7 +67,7 @@ struct IndexInfo | |||
67 | /** | 67 | /** |
68 | * Hash of the contents of the file. | 68 | * Hash of the contents of the file. |
69 | */ | 69 | */ |
70 | GNUNET_HashCode file_id; | 70 | struct GNUNET_HashCode file_id; |
71 | 71 | ||
72 | }; | 72 | }; |
73 | 73 | ||
@@ -126,7 +126,7 @@ write_index_list () | |||
126 | while (pos != NULL) | 126 | while (pos != NULL) |
127 | { | 127 | { |
128 | if ((GNUNET_OK != | 128 | if ((GNUNET_OK != |
129 | GNUNET_BIO_write (wh, &pos->file_id, sizeof (GNUNET_HashCode))) || | 129 | GNUNET_BIO_write (wh, &pos->file_id, sizeof (struct GNUNET_HashCode))) || |
130 | (GNUNET_OK != GNUNET_BIO_write_string (wh, pos->filename))) | 130 | (GNUNET_OK != GNUNET_BIO_write_string (wh, pos->filename))) |
131 | break; | 131 | break; |
132 | pos = pos->next; | 132 | pos = pos->next; |
@@ -152,7 +152,7 @@ read_index_list () | |||
152 | char *fn; | 152 | char *fn; |
153 | struct IndexInfo *pos; | 153 | struct IndexInfo *pos; |
154 | char *fname; | 154 | char *fname; |
155 | GNUNET_HashCode hc; | 155 | struct GNUNET_HashCode hc; |
156 | size_t slen; | 156 | size_t slen; |
157 | char *emsg; | 157 | char *emsg; |
158 | 158 | ||
@@ -180,7 +180,7 @@ read_index_list () | |||
180 | } | 180 | } |
181 | while ((GNUNET_OK == | 181 | while ((GNUNET_OK == |
182 | GNUNET_BIO_read (rh, "Hash of indexed file", &hc, | 182 | GNUNET_BIO_read (rh, "Hash of indexed file", &hc, |
183 | sizeof (GNUNET_HashCode))) && | 183 | sizeof (struct GNUNET_HashCode))) && |
184 | (GNUNET_OK == | 184 | (GNUNET_OK == |
185 | GNUNET_BIO_read_string (rh, "Name of indexed file", &fname, | 185 | GNUNET_BIO_read_string (rh, "Name of indexed file", &fname, |
186 | 1024 * 16)) && (fname != NULL)) | 186 | 1024 * 16)) && (fname != NULL)) |
@@ -253,13 +253,13 @@ signal_index_ok (struct IndexInfo *ii) | |||
253 | * @param res resulting hash, NULL on error | 253 | * @param res resulting hash, NULL on error |
254 | */ | 254 | */ |
255 | static void | 255 | static void |
256 | hash_for_index_val (void *cls, const GNUNET_HashCode * res) | 256 | hash_for_index_val (void *cls, const struct GNUNET_HashCode * res) |
257 | { | 257 | { |
258 | struct IndexInfo *ii = cls; | 258 | struct IndexInfo *ii = cls; |
259 | 259 | ||
260 | ii->fhc = NULL; | 260 | ii->fhc = NULL; |
261 | if ((res == NULL) || | 261 | if ((res == NULL) || |
262 | (0 != memcmp (res, &ii->file_id, sizeof (GNUNET_HashCode)))) | 262 | (0 != memcmp (res, &ii->file_id, sizeof (struct GNUNET_HashCode)))) |
263 | { | 263 | { |
264 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 264 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
265 | _ | 265 | _ |
@@ -431,7 +431,7 @@ GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client, | |||
431 | while (NULL != pos) | 431 | while (NULL != pos) |
432 | { | 432 | { |
433 | next = pos->next; | 433 | next = pos->next; |
434 | if (0 == memcmp (&pos->file_id, &um->file_id, sizeof (GNUNET_HashCode))) | 434 | if (0 == memcmp (&pos->file_id, &um->file_id, sizeof (struct GNUNET_HashCode))) |
435 | { | 435 | { |
436 | if (prev == NULL) | 436 | if (prev == NULL) |
437 | indexed_files = next; | 437 | indexed_files = next; |
@@ -502,7 +502,7 @@ remove_cont (void *cls, int success, | |||
502 | * @return GNUNET_OK on success | 502 | * @return GNUNET_OK on success |
503 | */ | 503 | */ |
504 | int | 504 | int |
505 | GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size, | 505 | GNUNET_FS_handle_on_demand_block (const struct GNUNET_HashCode * key, uint32_t size, |
506 | const void *data, enum GNUNET_BLOCK_Type type, | 506 | const void *data, enum GNUNET_BLOCK_Type type, |
507 | uint32_t priority, uint32_t anonymity, | 507 | uint32_t priority, uint32_t anonymity, |
508 | struct GNUNET_TIME_Absolute expiration, | 508 | struct GNUNET_TIME_Absolute expiration, |
@@ -511,10 +511,10 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size, | |||
511 | void *cont_cls) | 511 | void *cont_cls) |
512 | { | 512 | { |
513 | const struct OnDemandBlock *odb; | 513 | const struct OnDemandBlock *odb; |
514 | GNUNET_HashCode nkey; | 514 | struct GNUNET_HashCode nkey; |
515 | struct GNUNET_CRYPTO_AesSessionKey skey; | 515 | struct GNUNET_CRYPTO_AesSessionKey skey; |
516 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 516 | struct GNUNET_CRYPTO_AesInitializationVector iv; |
517 | GNUNET_HashCode query; | 517 | struct GNUNET_HashCode query; |
518 | ssize_t nsize; | 518 | ssize_t nsize; |
519 | char ndata[DBLOCK_SIZE]; | 519 | char ndata[DBLOCK_SIZE]; |
520 | char edata[DBLOCK_SIZE]; | 520 | char edata[DBLOCK_SIZE]; |
@@ -565,7 +565,7 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size, | |||
565 | GNUNET_CRYPTO_hash_to_aes_key (&nkey, &skey, &iv); | 565 | GNUNET_CRYPTO_hash_to_aes_key (&nkey, &skey, &iv); |
566 | GNUNET_CRYPTO_aes_encrypt (ndata, nsize, &skey, &iv, edata); | 566 | GNUNET_CRYPTO_aes_encrypt (ndata, nsize, &skey, &iv, edata); |
567 | GNUNET_CRYPTO_hash (edata, nsize, &query); | 567 | GNUNET_CRYPTO_hash (edata, nsize, &query); |
568 | if (0 != memcmp (&query, key, sizeof (GNUNET_HashCode))) | 568 | if (0 != memcmp (&query, key, sizeof (struct GNUNET_HashCode))) |
569 | { | 569 | { |
570 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 570 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
571 | _("Indexed file `%s' changed at offset %llu\n"), fn, | 571 | _("Indexed file `%s' changed at offset %llu\n"), fn, |