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