808f56a2c29af8eb829d5b8dfc50d3dda73c33f9
[oweals/gnunet.git] / src / fs / gnunet-service-fs_indexing.c
1 /*
2      This file is part of GNUnet.
3      (C) 2009, 2010 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 2, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /**
22  * @file fs/gnunet-service-fs_indexing.c
23  * @brief program that provides indexing functions of the file-sharing service
24  * @author Christian Grothoff
25  *
26  * TODO:
27  * - consider doing GNUNET_CRYPTO_hash_file_cancel on active indexing
28  *   jobs during shutdown (currently, shutdown will only happen after
29  *   all of those are done, not sure if this is good or bad)
30  */
31 #include "platform.h"
32 #include <float.h>
33 #include "gnunet_core_service.h"
34 #include "gnunet_datastore_service.h"
35 #include "gnunet_peer_lib.h"
36 #include "gnunet_protocols.h"
37 #include "gnunet_signatures.h"
38 #include "gnunet_util_lib.h"
39 #include "gnunet-service-fs_drq.h"
40 #include "gnunet-service-fs_indexing.h"
41 #include "fs.h"
42
43 #define DEBUG_FS GNUNET_YES
44
45 /**
46  * In-memory information about indexed files (also available
47  * on-disk).
48  */
49 struct IndexInfo
50 {
51   
52   /**
53    * This is a linked list.
54    */
55   struct IndexInfo *next;
56
57   /**
58    * Name of the indexed file.  Memory allocated
59    * at the end of this struct (do not free).
60    */
61   const char *filename;
62
63   /**
64    * Context for transmitting confirmation to client,
65    * NULL if we've done this already.
66    */
67   struct GNUNET_SERVER_TransmitContext *tc;
68
69   /**
70    * Context for hashing of the file.
71    */
72   struct GNUNET_CRYPTO_FileHashContext *fhc;
73   
74   /**
75    * Hash of the contents of the file.
76    */
77   GNUNET_HashCode file_id;
78
79 };
80
81
82 /**
83  * Linked list of indexed files.
84  */
85 static struct IndexInfo *indexed_files;
86
87 /**
88  * Maps hash over content of indexed files to the respective filename.
89  * The filenames are pointers into the indexed_files linked list and
90  * do not need to be freed.
91  */
92 static struct GNUNET_CONTAINER_MultiHashMap *ifm;
93
94 /**
95  * Our scheduler.
96  */
97 static struct GNUNET_SCHEDULER_Handle *sched;
98
99 /**
100  * Our configuration.
101  */
102 static const struct GNUNET_CONFIGURATION_Handle *cfg;
103
104 /**
105  * Datastore handle.  Created and destroyed by code in
106  * gnunet-service-fs (this is an alias).
107  */
108 static struct GNUNET_DATASTORE_Handle *dsh;
109
110
111 /**
112  * Write the current index information list to disk.
113  */ 
114 static void
115 write_index_list ()
116 {
117   struct GNUNET_BIO_WriteHandle *wh;
118   char *fn;
119   struct IndexInfo *pos;  
120
121   if (GNUNET_OK !=
122       GNUNET_CONFIGURATION_get_value_filename (cfg,
123                                                "FS",
124                                                "INDEXDB",
125                                                &fn))
126     {
127       GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
128                   _("Configuration option `%s' in section `%s' missing.\n"),
129                   "INDEXDB",
130                   "FS");
131       return;
132     }
133   wh = GNUNET_BIO_write_open (fn);
134   if (NULL == wh)
135     {
136       GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
137                   _("Could not open `%s'.\n"),
138                   fn);
139       GNUNET_free (fn);
140       return;
141     }
142   pos = indexed_files;
143   while (pos != NULL)
144     {
145       if ( (GNUNET_OK !=
146             GNUNET_BIO_write (wh,
147                               &pos->file_id,
148                               sizeof (GNUNET_HashCode))) ||
149            (GNUNET_OK !=
150             GNUNET_BIO_write_string (wh,
151                                      pos->filename)) )
152         break;
153       pos = pos->next;
154     }
155   if (GNUNET_OK != 
156       GNUNET_BIO_write_close (wh))
157     {
158       GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
159                   _("Error writing `%s'.\n"),
160                   fn);
161       GNUNET_free (fn);
162       return;
163     }
164   GNUNET_free (fn);
165 }
166
167
168 /**
169  * Read index information from disk.
170  */
171 static void
172 read_index_list ()
173 {
174   struct GNUNET_BIO_ReadHandle *rh;
175   char *fn;
176   struct IndexInfo *pos;  
177   char *fname;
178   GNUNET_HashCode hc;
179   size_t slen;
180   char *emsg;
181
182   if (GNUNET_OK !=
183       GNUNET_CONFIGURATION_get_value_filename (cfg,
184                                                "FS",
185                                                "INDEXDB",
186                                                &fn))
187     {
188       GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
189                   _("Configuration option `%s' in section `%s' missing.\n"),
190                   "INDEXDB",
191                   "FS");
192       return;
193     }
194   if (GNUNET_NO == GNUNET_DISK_file_test (fn))
195     {
196       /* no index info yet */
197       GNUNET_free (fn);
198       return;
199     }
200   rh = GNUNET_BIO_read_open (fn);
201   if (NULL == rh)
202     {
203       GNUNET_log (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
204                   _("Could not open `%s'.\n"),
205                   fn);
206       GNUNET_free (fn);
207       return;
208     }
209   while ( (GNUNET_OK ==
210            GNUNET_BIO_read (rh,
211                             "Hash of indexed file",
212                             &hc,
213                             sizeof (GNUNET_HashCode))) &&
214           (GNUNET_OK ==
215            GNUNET_BIO_read_string (rh, 
216                                    "Name of indexed file",
217                                    &fname,
218                                    1024 * 16)) )
219     {
220       slen = strlen (fname) + 1;
221       pos = GNUNET_malloc (sizeof (struct IndexInfo) + slen);
222       pos->file_id = hc;
223       pos->filename = (const char *) &pos[1];
224       memcpy (&pos[1], fname, slen);
225       if (GNUNET_SYSERR ==
226           GNUNET_CONTAINER_multihashmap_put (ifm,
227                                              &hc,
228                                              (void*) pos->filename,
229                                              GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY))
230         {
231           GNUNET_free (pos);
232         }
233       else
234         {
235           pos->next = indexed_files;
236           indexed_files = pos;
237         }
238       GNUNET_free (fname);
239     }
240   if (GNUNET_OK != 
241       GNUNET_BIO_read_close (rh, &emsg))
242     GNUNET_free (emsg);
243   GNUNET_free (fn);
244 }
245
246
247 /**
248  * We've validated the hash of the file we're about to index.  Signal
249  * success to the client and update our internal data structures.
250  *
251  * @param ii the index info entry for the request
252  */
253 static void
254 signal_index_ok (struct IndexInfo *ii)
255 {
256   if (GNUNET_SYSERR ==
257       GNUNET_CONTAINER_multihashmap_put (ifm,
258                                          &ii->file_id,
259                                          (void*) ii->filename,
260                                          GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY))
261     {
262       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
263                   _("Index request received for file `%s' is already indexed as `%s'.  Permitting anyway.\n"),
264                   ii->filename,
265                   (const char*) GNUNET_CONTAINER_multihashmap_get (ifm,
266                                                                    &ii->file_id));
267       GNUNET_SERVER_transmit_context_append_data (ii->tc,
268                                                   NULL, 0,
269                                                   GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK);
270       GNUNET_SERVER_transmit_context_run (ii->tc,
271                                           GNUNET_TIME_UNIT_MINUTES);
272       GNUNET_free (ii);
273       return;
274     }
275   ii->next = indexed_files;
276   indexed_files = ii;
277   write_index_list ();
278   GNUNET_SERVER_transmit_context_append_data (ii->tc,
279                                               NULL, 0,
280                                               GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK);
281   GNUNET_SERVER_transmit_context_run (ii->tc,
282                                       GNUNET_TIME_UNIT_MINUTES);
283   ii->tc = NULL;
284 }
285
286
287 /**
288  * Function called once the hash computation over an
289  * indexed file has completed.
290  *
291  * @param cls closure, our publishing context
292  * @param res resulting hash, NULL on error
293  */
294 static void 
295 hash_for_index_val (void *cls,
296                     const GNUNET_HashCode *
297                     res)
298 {
299   struct IndexInfo *ii = cls;
300
301   ii->fhc = NULL;
302   if ( (res == NULL) ||
303        (0 != memcmp (res,
304                      &ii->file_id,
305                      sizeof(GNUNET_HashCode))) )
306     {
307       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
308                   _("Hash mismatch trying to index file `%s' which has hash `%s'\n"),
309                   ii->filename,
310                   GNUNET_h2s (res));
311 #if DEBUG_FS
312       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
313                   "Wanted `%s'\n",
314                   GNUNET_h2s (&ii->file_id));
315 #endif
316       GNUNET_SERVER_transmit_context_append_data (ii->tc,
317                                                   NULL, 0,
318                                                   GNUNET_MESSAGE_TYPE_FS_INDEX_START_FAILED);
319       GNUNET_SERVER_transmit_context_run (ii->tc,
320                                           GNUNET_TIME_UNIT_MINUTES);
321       GNUNET_free (ii);
322       return;
323     }
324   signal_index_ok (ii);
325 }
326
327
328 /**
329  * Handle INDEX_START-message.
330  *
331  * @param cls closure
332  * @param client identification of the client
333  * @param message the actual message
334  */
335 void
336 GNUNET_FS_handle_index_start (void *cls,
337                               struct GNUNET_SERVER_Client *client,
338                               const struct GNUNET_MessageHeader *message)
339 {
340   const struct IndexStartMessage *ism;
341   char *fn;
342   uint16_t msize;
343   struct IndexInfo *ii;
344   size_t slen;
345   uint32_t dev;
346   uint64_t ino;
347   uint32_t mydev;
348   uint64_t myino;
349
350   msize = ntohs(message->size);
351   if ( (msize <= sizeof (struct IndexStartMessage)) ||
352        ( ((const char *)message)[msize-1] != '\0') )
353     {
354       GNUNET_break (0);
355       GNUNET_SERVER_receive_done (client,
356                                   GNUNET_SYSERR);
357       return;
358     }
359   ism = (const struct IndexStartMessage*) message;
360   fn = GNUNET_STRINGS_filename_expand ((const char*) &ism[1]);
361   dev = ntohl (ism->device);
362   ino = GNUNET_ntohll (ism->inode);
363   ism = (const struct IndexStartMessage*) message;
364   slen = strlen (fn) + 1;
365   ii = GNUNET_malloc (sizeof (struct IndexInfo) + slen);
366   ii->filename = (const char*) &ii[1];
367   memcpy (&ii[1], fn, slen);
368   ii->file_id = ism->file_id;  
369 #if DEBUG_FS
370   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
371               "Received `%s' message for file `%s'\n",
372               "START_INDEX",
373               ii->filename);
374 #endif
375
376   ii->tc = GNUNET_SERVER_transmit_context_create (client);
377   mydev = 0;
378   myino = 0;
379   if ( ( (dev != 0) ||
380          (ino != 0) ) &&
381        (GNUNET_OK == GNUNET_DISK_file_get_identifiers (fn,
382                                                        &mydev,
383                                                        &myino)) &&
384        ( (dev == mydev) &&
385          (ino == myino) ) )
386     {      
387       /* fast validation OK! */
388       signal_index_ok (ii);
389       GNUNET_free (fn);
390       return;
391     }
392 #if DEBUG_FS
393   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
394               "Mismatch in file identifiers (%llu != %llu or %u != %u), need to hash.\n",
395               (unsigned long long) ino,
396               (unsigned long long) myino,
397               (unsigned int) dev,
398               (unsigned int) mydev);
399 #endif
400   /* slow validation, need to hash full file (again) */
401   ii->fhc = GNUNET_CRYPTO_hash_file (sched,
402                                      GNUNET_SCHEDULER_PRIORITY_IDLE,
403                                      fn,
404                                      HASHING_BLOCKSIZE,
405                                      &hash_for_index_val,
406                                      ii);
407   if (ii->fhc == NULL)    
408     hash_for_index_val (ii, NULL);    
409   GNUNET_free (fn);
410 }
411
412
413 /**
414  * Handle INDEX_LIST_GET-message.
415  *
416  * @param cls closure
417  * @param client identification of the client
418  * @param message the actual message
419  */
420 void
421 GNUNET_FS_handle_index_list_get (void *cls,
422                                  struct GNUNET_SERVER_Client *client,
423                                  const struct GNUNET_MessageHeader *message)
424 {
425   struct GNUNET_SERVER_TransmitContext *tc;
426   struct IndexInfoMessage *iim;
427   char buf[GNUNET_SERVER_MAX_MESSAGE_SIZE];
428   size_t slen;
429   const char *fn;
430   struct IndexInfo *pos;
431
432   tc = GNUNET_SERVER_transmit_context_create (client);
433   iim = (struct IndexInfoMessage*) buf;
434   pos = indexed_files;
435   while (NULL != pos)
436     {
437       fn = pos->filename;
438       slen = strlen (fn) + 1;
439       if (slen + sizeof (struct IndexInfoMessage) > 
440           GNUNET_SERVER_MAX_MESSAGE_SIZE)
441         {
442           GNUNET_break (0);
443           break;
444         }
445       iim->header.type = htons (GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_ENTRY);
446       iim->header.size = htons (slen + sizeof (struct IndexInfoMessage));
447       iim->reserved = 0;
448       iim->file_id = pos->file_id;
449       memcpy (&iim[1], fn, slen);
450       GNUNET_SERVER_transmit_context_append_message (tc,
451                                                      &iim->header);
452       pos = pos->next;
453     }
454   GNUNET_SERVER_transmit_context_append_data (tc,
455                                               NULL, 0,
456                                               GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_END);
457   GNUNET_SERVER_transmit_context_run (tc,
458                                       GNUNET_TIME_UNIT_MINUTES);
459 }
460
461
462 /**
463  * Handle UNINDEX-message.
464  *
465  * @param cls closure
466  * @param client identification of the client
467  * @param message the actual message
468  */
469 void
470 GNUNET_FS_handle_unindex (void *cls,
471                           struct GNUNET_SERVER_Client *client,
472                           const struct GNUNET_MessageHeader *message)
473 {
474   const struct UnindexMessage *um;
475   struct IndexInfo *pos;
476   struct IndexInfo *prev;
477   struct IndexInfo *next;
478   struct GNUNET_SERVER_TransmitContext *tc;
479   int found;
480
481   um = (const struct UnindexMessage*) message;
482   found = GNUNET_NO;
483   prev = NULL;
484   pos = indexed_files;
485   while (NULL != pos)
486     {
487       next = pos->next;
488       if (0 == memcmp (&pos->file_id,
489                        &um->file_id,
490                        sizeof (GNUNET_HashCode)))
491         {
492           if (prev == NULL)
493             indexed_files = next;
494           else
495             prev->next = next;
496           GNUNET_break (GNUNET_OK ==
497                         GNUNET_CONTAINER_multihashmap_remove (ifm,
498                                                               &pos->file_id,
499                                                               (void*) pos->filename));
500           GNUNET_free (pos);
501           found = GNUNET_YES;
502         }
503       else
504         {
505           prev = pos;
506         }
507       pos = next;
508     }
509 #if DEBUG_FS
510   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
511               "Client requested unindexing of file `%s': %s\n",
512               GNUNET_h2s (&um->file_id),
513               found ? "found" : "not found");
514 #endif
515   if (GNUNET_YES == found)    
516     write_index_list ();
517   tc = GNUNET_SERVER_transmit_context_create (client);
518   GNUNET_SERVER_transmit_context_append_data (tc,
519                                               NULL, 0,
520                                               GNUNET_MESSAGE_TYPE_FS_UNINDEX_OK);
521   GNUNET_SERVER_transmit_context_run (tc,
522                                       GNUNET_TIME_UNIT_MINUTES);
523 }
524
525
526
527
528 /**
529  * Continuation called from datastore's remove
530  * function.
531  *
532  * @param cls unused
533  * @param success did the deletion work?
534  * @param msg error message
535  */
536 static void
537 remove_cont (void *cls,
538              int success,
539              const char *msg)
540 {
541   if (GNUNET_OK != success)
542     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
543                 _("Failed to delete bogus block: %s\n"),
544                 msg);
545 }
546
547
548 /**
549  * We've received an on-demand encoded block from the datastore.
550  * Attempt to do on-demand encoding and (if successful), call the
551  * continuation with the resulting block.  On error, clean up and ask
552  * the datastore for more results.
553  *
554  * @param key key for the content
555  * @param size number of bytes in data
556  * @param data content stored
557  * @param type type of the content
558  * @param priority priority of the content
559  * @param anonymity anonymity-level for the content
560  * @param expiration expiration time for the content
561  * @param uid unique identifier for the datum;
562  *        maybe 0 if no unique identifier is available
563  * @param cont function to call with the actual block (at most once, on success)
564  * @param cont_cls closure for cont
565  * @return GNUNET_OK on success
566  */
567 int
568 GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
569                                   uint32_t size,
570                                   const void *data,
571                                   enum GNUNET_BLOCK_Type type,
572                                   uint32_t priority,
573                                   uint32_t anonymity,
574                                   struct GNUNET_TIME_Absolute
575                                   expiration, uint64_t uid,
576                                   GNUNET_DATASTORE_Iterator cont,
577                                   void *cont_cls)
578 {
579   const struct OnDemandBlock *odb;
580   GNUNET_HashCode nkey;
581   struct GNUNET_CRYPTO_AesSessionKey skey;
582   struct GNUNET_CRYPTO_AesInitializationVector iv;
583   GNUNET_HashCode query;
584   ssize_t nsize;
585   char ndata[DBLOCK_SIZE];
586   char edata[DBLOCK_SIZE];
587   const char *fn;
588   struct GNUNET_DISK_FileHandle *fh;
589   uint64_t off;
590
591   if (size != sizeof (struct OnDemandBlock))
592     {
593       GNUNET_break (0);
594       GNUNET_DATASTORE_remove (dsh,
595                                key,
596                                size,
597                                data,
598                                -1, -1,
599                                GNUNET_TIME_UNIT_FOREVER_REL,
600                                &remove_cont,
601                                NULL);
602       return GNUNET_SYSERR;
603     }
604   odb = (const struct OnDemandBlock*) data;
605   off = GNUNET_ntohll (odb->offset);
606   fn = (const char*) GNUNET_CONTAINER_multihashmap_get (ifm,
607                                                         &odb->file_id);
608   fh = NULL;
609   if ( (NULL == fn) ||
610        (NULL == (fh = GNUNET_DISK_file_open (fn, 
611                                              GNUNET_DISK_OPEN_READ,
612                                              GNUNET_DISK_PERM_NONE))) ||
613        (off !=
614         GNUNET_DISK_file_seek (fh,
615                                off,
616                                GNUNET_DISK_SEEK_SET)) ||
617        (-1 ==
618         (nsize = GNUNET_DISK_file_read (fh,
619                                         ndata,
620                                         sizeof (ndata)))) )
621     {
622       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
623                   _("Could not access indexed file `%s' (%s) at offset %llu: %s\n"),
624                   GNUNET_h2s (&odb->file_id),
625                   fn,
626                   (unsigned long long) off,
627                   (fn == NULL) ? _("not indexed") : STRERROR (errno));
628       if (fh != NULL)
629         GNUNET_DISK_file_close (fh);
630       GNUNET_DATASTORE_remove (dsh,
631                                key,
632                                size,
633                                data,
634                                -1, -1,
635                                GNUNET_TIME_UNIT_FOREVER_REL,
636                                &remove_cont,
637                                NULL);
638       return GNUNET_SYSERR;
639     }
640   GNUNET_DISK_file_close (fh);
641   GNUNET_CRYPTO_hash (ndata,
642                       nsize,
643                       &nkey);
644   GNUNET_CRYPTO_hash_to_aes_key (&nkey, &skey, &iv);
645   GNUNET_CRYPTO_aes_encrypt (ndata,
646                              nsize,
647                              &skey,
648                              &iv,
649                              edata);
650   GNUNET_CRYPTO_hash (edata,
651                       nsize,
652                       &query);
653   if (0 != memcmp (&query, 
654                    key,
655                    sizeof (GNUNET_HashCode)))
656     {
657       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
658                   _("Indexed file `%s' changed at offset %llu\n"),
659                   fn,
660                   (unsigned long long) off);
661       GNUNET_DATASTORE_remove (dsh,
662                                key,
663                                size,
664                                data,
665                                -1, -1,
666                                GNUNET_TIME_UNIT_FOREVER_REL,
667                                &remove_cont,
668                                NULL);
669       return GNUNET_SYSERR;
670     }
671 #if DEBUG_FS
672       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
673                   "On-demand encoded block for query `%s'\n",
674                   GNUNET_h2s (key));
675 #endif  
676   cont (cont_cls,
677         key,
678         nsize,
679         edata,
680         GNUNET_BLOCK_TYPE_DBLOCK,
681         priority,
682         anonymity,
683         expiration,
684         uid);
685   return GNUNET_OK;
686 }
687
688
689 /**
690  * Task run during shutdown.
691  *
692  * @param cls unused
693  * @param tc unused
694  */
695 static void
696 shutdown_task (void *cls,
697                const struct GNUNET_SCHEDULER_TaskContext *tc)
698 {
699   struct IndexInfo *pos;  
700
701   GNUNET_CONTAINER_multihashmap_destroy (ifm);
702   ifm = NULL;
703   while (NULL != (pos = indexed_files))
704     {
705       indexed_files = pos->next;
706       GNUNET_free (pos);
707     }
708   sched = NULL;
709   cfg = NULL;
710 }
711
712
713 /**
714  * Initialize the indexing submodule.
715  *
716  * @param s scheduler to use
717  * @param c configuration to use
718  * @param d datastore to use
719  */
720 int
721 GNUNET_FS_indexing_init (struct GNUNET_SCHEDULER_Handle *s,
722                          const struct GNUNET_CONFIGURATION_Handle *c,
723                          struct GNUNET_DATASTORE_Handle *d)
724 {
725   sched = s;
726   cfg = c;
727   dsh = d;
728   ifm = GNUNET_CONTAINER_multihashmap_create (128);
729   GNUNET_SCHEDULER_add_delayed (sched,
730                                 GNUNET_TIME_UNIT_FOREVER_REL,
731                                 &shutdown_task,
732                                 NULL);
733   read_index_list ();
734   return GNUNET_OK;
735 }
736
737 /* end of gnunet-service-fs_indexing.c */