fs_directory.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. /*
  2. This file is part of GNUnet.
  3. (C) 2003, 2004, 2006, 2009 Christian Grothoff (and other contributing authors)
  4. GNUnet is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published
  6. by the Free Software Foundation; either version 3, or (at your
  7. option) any later version.
  8. GNUnet is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNUnet; see the file COPYING. If not, write to the
  14. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA.
  16. */
  17. /**
  18. * @file fs/fs_directory.c
  19. * @brief Helper functions for building directories.
  20. * @author Christian Grothoff
  21. *
  22. * TODO:
  23. * - modify directory builder API to support incremental
  24. * generation of directories (to allow directories that
  25. * would not fit into memory to be created)
  26. * - modify directory processor API to support incremental
  27. * iteration over FULL directories (without missing entries)
  28. * to allow access to directories that do not fit entirely
  29. * into memory
  30. */
  31. #include "platform.h"
  32. #include "gnunet_fs_service.h"
  33. #include "fs.h"
  34. /**
  35. * String that is used to indicate that a file
  36. * is a GNUnet directory.
  37. */
  38. #define GNUNET_DIRECTORY_MAGIC "\211GND\r\n\032\n"
  39. /**
  40. * Does the meta-data claim that this is a directory?
  41. * Checks if the mime-type is that of a GNUnet directory.
  42. *
  43. * @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if
  44. * we have no mime-type information (treat as 'GNUNET_NO')
  45. */
  46. int
  47. GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData
  48. *md)
  49. {
  50. char *mime;
  51. int ret;
  52. if (NULL == md)
  53. return GNUNET_SYSERR;
  54. mime =
  55. GNUNET_CONTAINER_meta_data_get_by_type (md, EXTRACTOR_METATYPE_MIMETYPE);
  56. if (mime == NULL)
  57. return GNUNET_SYSERR;
  58. ret = (0 == strcmp (mime, GNUNET_FS_DIRECTORY_MIME)) ? GNUNET_YES : GNUNET_NO;
  59. GNUNET_free (mime);
  60. return ret;
  61. }
  62. /**
  63. * Set the MIMETYPE information for the given
  64. * metadata to "application/gnunet-directory".
  65. *
  66. * @param md metadata to add mimetype to
  67. */
  68. void
  69. GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md)
  70. {
  71. char *mime;
  72. mime =
  73. GNUNET_CONTAINER_meta_data_get_by_type (md, EXTRACTOR_METATYPE_MIMETYPE);
  74. if (mime != NULL)
  75. {
  76. GNUNET_break (0 == strcmp (mime, GNUNET_FS_DIRECTORY_MIME));
  77. GNUNET_free (mime);
  78. return;
  79. }
  80. GNUNET_CONTAINER_meta_data_insert (md, "<gnunet>",
  81. EXTRACTOR_METATYPE_MIMETYPE,
  82. EXTRACTOR_METAFORMAT_UTF8, "text/plain",
  83. GNUNET_FS_DIRECTORY_MIME,
  84. strlen (GNUNET_FS_DIRECTORY_MIME) + 1);
  85. }
  86. /**
  87. * Closure for 'find_full_data'.
  88. */
  89. struct GetFullDataClosure
  90. {
  91. /**
  92. * Extracted binary meta data.
  93. */
  94. void *data;
  95. /**
  96. * Number of bytes stored in data.
  97. */
  98. size_t size;
  99. };
  100. /**
  101. * Type of a function that libextractor calls for each
  102. * meta data item found.
  103. *
  104. * @param cls closure (user-defined)
  105. * @param plugin_name name of the plugin that produced this value;
  106. * special values can be used (i.e. '&lt;zlib&gt;' for zlib being
  107. * used in the main libextractor library and yielding
  108. * meta data).
  109. * @param type libextractor-type describing the meta data
  110. * @param format basic format information about data
  111. * @param data_mime_type mime-type of data (not of the original file);
  112. * can be NULL (if mime-type is not known)
  113. * @param data actual meta-data found
  114. * @param data_len number of bytes in data
  115. * @return 0 to continue extracting, 1 to abort
  116. */
  117. static int
  118. find_full_data (void *cls, const char *plugin_name,
  119. enum EXTRACTOR_MetaType type, enum EXTRACTOR_MetaFormat format,
  120. const char *data_mime_type, const char *data, size_t data_len)
  121. {
  122. struct GetFullDataClosure *gfdc = cls;
  123. if (type == EXTRACTOR_METATYPE_GNUNET_FULL_DATA)
  124. {
  125. gfdc->size = data_len;
  126. if (data_len > 0)
  127. {
  128. gfdc->data = GNUNET_malloc (data_len);
  129. memcpy (gfdc->data, data, data_len);
  130. }
  131. return 1;
  132. }
  133. return 0;
  134. }
  135. /**
  136. * Iterate over all entries in a directory. Note that directories
  137. * are structured such that it is possible to iterate over the
  138. * individual blocks as well as over the entire directory. Thus
  139. * a client can call this function on the buffer in the
  140. * GNUNET_FS_ProgressCallback. Also, directories can optionally
  141. * include the contents of (small) files embedded in the directory
  142. * itself; for those files, the processor may be given the
  143. * contents of the file directly by this function.
  144. * <p>
  145. *
  146. * Note that this function maybe called on parts of directories. Thus
  147. * parser errors should not be reported _at all_ (with GNUNET_break).
  148. * Still, if some entries can be recovered despite these parsing
  149. * errors, the function should try to do this.
  150. *
  151. * @param size number of bytes in data
  152. * @param data pointer to the beginning of the directory
  153. * @param offset offset of data in the directory
  154. * @param dep function to call on each entry
  155. * @param dep_cls closure for dep
  156. * @return GNUNET_OK if this could be a block in a directory,
  157. * GNUNET_NO if this could be part of a directory (but not 100% OK)
  158. * GNUNET_SYSERR if 'data' does not represent a directory
  159. */
  160. int
  161. GNUNET_FS_directory_list_contents (size_t size, const void *data,
  162. uint64_t offset,
  163. GNUNET_FS_DirectoryEntryProcessor dep,
  164. void *dep_cls)
  165. {
  166. struct GetFullDataClosure full_data;
  167. const char *cdata = data;
  168. char *emsg;
  169. uint64_t pos;
  170. uint64_t align;
  171. uint32_t mdSize;
  172. uint64_t epos;
  173. struct GNUNET_FS_Uri *uri;
  174. struct GNUNET_CONTAINER_MetaData *md;
  175. char *filename;
  176. if ((offset == 0) &&
  177. ((size < 8 + sizeof (uint32_t)) ||
  178. (0 != memcmp (cdata, GNUNET_FS_DIRECTORY_MAGIC, 8))))
  179. {
  180. GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
  181. _("MAGIC mismatch. This is not a GNUnet directory.\n"));
  182. return GNUNET_SYSERR;
  183. }
  184. pos = offset;
  185. if (offset == 0)
  186. {
  187. memcpy (&mdSize, &cdata[8], sizeof (uint32_t));
  188. mdSize = ntohl (mdSize);
  189. if (mdSize > size - 8 - sizeof (uint32_t))
  190. {
  191. /* invalid size */
  192. GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
  193. _("MAGIC mismatch. This is not a GNUnet directory.\n"));
  194. return GNUNET_SYSERR;
  195. }
  196. md = GNUNET_CONTAINER_meta_data_deserialize (&cdata[8 + sizeof (uint32_t)],
  197. mdSize);
  198. if (md == NULL)
  199. {
  200. GNUNET_break (0);
  201. return GNUNET_SYSERR; /* malformed ! */
  202. }
  203. dep (dep_cls, NULL, NULL, md, 0, NULL);
  204. GNUNET_CONTAINER_meta_data_destroy (md);
  205. pos = 8 + sizeof (uint32_t) + mdSize;
  206. }
  207. while (pos < size)
  208. {
  209. /* find end of URI */
  210. if (cdata[pos] == '\0')
  211. {
  212. /* URI is never empty, must be end of block,
  213. * skip to next alignment */
  214. align = ((pos / DBLOCK_SIZE) + 1) * DBLOCK_SIZE;
  215. if (align == pos)
  216. {
  217. /* if we were already aligned, still skip a block! */
  218. align += DBLOCK_SIZE;
  219. }
  220. pos = align;
  221. if (pos >= size)
  222. {
  223. /* malformed - or partial download... */
  224. break;
  225. }
  226. }
  227. epos = pos;
  228. while ((epos < size) && (cdata[epos] != '\0'))
  229. epos++;
  230. if (epos >= size)
  231. return GNUNET_NO; /* malformed - or partial download */
  232. uri = GNUNET_FS_uri_parse (&cdata[pos], &emsg);
  233. pos = epos + 1;
  234. if (uri == NULL)
  235. {
  236. GNUNET_free (emsg);
  237. pos--; /* go back to '\0' to force going to next alignment */
  238. continue;
  239. }
  240. if (GNUNET_FS_uri_test_ksk (uri))
  241. {
  242. GNUNET_FS_uri_destroy (uri);
  243. GNUNET_break (0);
  244. return GNUNET_NO; /* illegal in directory! */
  245. }
  246. memcpy (&mdSize, &cdata[pos], sizeof (uint32_t));
  247. mdSize = ntohl (mdSize);
  248. pos += sizeof (uint32_t);
  249. if (pos + mdSize > size)
  250. {
  251. GNUNET_FS_uri_destroy (uri);
  252. return GNUNET_NO; /* malformed - or partial download */
  253. }
  254. md = GNUNET_CONTAINER_meta_data_deserialize (&cdata[pos], mdSize);
  255. if (md == NULL)
  256. {
  257. GNUNET_FS_uri_destroy (uri);
  258. GNUNET_break (0);
  259. return GNUNET_NO; /* malformed ! */
  260. }
  261. pos += mdSize;
  262. filename =
  263. GNUNET_CONTAINER_meta_data_get_by_type (md,
  264. EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME);
  265. full_data.size = 0;
  266. full_data.data = NULL;
  267. GNUNET_CONTAINER_meta_data_iterate (md, &find_full_data, &full_data);
  268. if (dep != NULL)
  269. {
  270. dep (dep_cls, filename, uri, md, full_data.size, full_data.data);
  271. }
  272. GNUNET_free_non_null (full_data.data);
  273. GNUNET_free_non_null (filename);
  274. GNUNET_CONTAINER_meta_data_destroy (md);
  275. GNUNET_FS_uri_destroy (uri);
  276. }
  277. return GNUNET_OK;
  278. }
  279. /**
  280. * Entries in the directory (builder).
  281. */
  282. struct BuilderEntry
  283. {
  284. /**
  285. * This is a linked list.
  286. */
  287. struct BuilderEntry *next;
  288. /**
  289. * Length of this entry.
  290. */
  291. size_t len;
  292. };
  293. /**
  294. * Internal state of a directory builder.
  295. */
  296. struct GNUNET_FS_DirectoryBuilder
  297. {
  298. /**
  299. * Meta-data for the directory itself.
  300. */
  301. struct GNUNET_CONTAINER_MetaData *meta;
  302. /**
  303. * Head of linked list of entries.
  304. */
  305. struct BuilderEntry *head;
  306. /**
  307. * Number of entires in the directory.
  308. */
  309. unsigned int count;
  310. };
  311. /**
  312. * Create a directory builder.
  313. *
  314. * @param mdir metadata for the directory
  315. */
  316. struct GNUNET_FS_DirectoryBuilder *
  317. GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData
  318. *mdir)
  319. {
  320. struct GNUNET_FS_DirectoryBuilder *ret;
  321. ret = GNUNET_malloc (sizeof (struct GNUNET_FS_DirectoryBuilder));
  322. if (mdir != NULL)
  323. ret->meta = GNUNET_CONTAINER_meta_data_duplicate (mdir);
  324. else
  325. ret->meta = GNUNET_CONTAINER_meta_data_create ();
  326. GNUNET_FS_meta_data_make_directory (ret->meta);
  327. return ret;
  328. }
  329. /**
  330. * Add an entry to a directory.
  331. *
  332. * @param bld directory to extend
  333. * @param uri uri of the entry (must not be a KSK)
  334. * @param md metadata of the entry
  335. * @param data raw data of the entry, can be NULL, otherwise
  336. * data must point to exactly the number of bytes specified
  337. * by the uri which must be of type LOC or CHK
  338. */
  339. void
  340. GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld,
  341. const struct GNUNET_FS_Uri *uri,
  342. const struct GNUNET_CONTAINER_MetaData *md,
  343. const void *data)
  344. {
  345. struct GNUNET_FS_Uri *curi;
  346. struct BuilderEntry *e;
  347. uint64_t fsize;
  348. uint32_t big;
  349. ssize_t ret;
  350. size_t mds;
  351. size_t mdxs;
  352. char *uris;
  353. char *ser;
  354. char *sptr;
  355. size_t slen;
  356. struct GNUNET_CONTAINER_MetaData *meta;
  357. const struct GNUNET_CONTAINER_MetaData *meta_use;
  358. GNUNET_assert (!GNUNET_FS_uri_test_ksk (uri));
  359. if (NULL != data)
  360. {
  361. GNUNET_assert (!GNUNET_FS_uri_test_sks (uri));
  362. if (GNUNET_FS_uri_test_chk (uri))
  363. {
  364. fsize = GNUNET_FS_uri_chk_get_file_size (uri);
  365. }
  366. else
  367. {
  368. curi = GNUNET_FS_uri_loc_get_uri (uri);
  369. GNUNET_assert (NULL != curi);
  370. fsize = GNUNET_FS_uri_chk_get_file_size (curi);
  371. GNUNET_FS_uri_destroy (curi);
  372. }
  373. }
  374. else
  375. {
  376. fsize = 0; /* not given */
  377. }
  378. if (fsize > MAX_INLINE_SIZE)
  379. fsize = 0; /* too large */
  380. uris = GNUNET_FS_uri_to_string (uri);
  381. slen = strlen (uris) + 1;
  382. mds = GNUNET_CONTAINER_meta_data_get_serialized_size (md);
  383. meta_use = md;
  384. meta = NULL;
  385. if (fsize > 0)
  386. {
  387. meta = GNUNET_CONTAINER_meta_data_duplicate (md);
  388. GNUNET_CONTAINER_meta_data_insert (meta, "<gnunet>",
  389. EXTRACTOR_METATYPE_GNUNET_FULL_DATA,
  390. EXTRACTOR_METAFORMAT_BINARY, NULL, data,
  391. fsize);
  392. mdxs = GNUNET_CONTAINER_meta_data_get_serialized_size (meta);
  393. if ((slen + sizeof (uint32_t) + mdxs - 1) / DBLOCK_SIZE ==
  394. (slen + sizeof (uint32_t) + mds - 1) / DBLOCK_SIZE)
  395. {
  396. /* adding full data would not cause us to cross
  397. * additional blocks, so add it! */
  398. meta_use = meta;
  399. mds = mdxs;
  400. }
  401. }
  402. if (mds > GNUNET_MAX_MALLOC_CHECKED / 2)
  403. mds = GNUNET_MAX_MALLOC_CHECKED / 2;
  404. e = GNUNET_malloc (sizeof (struct BuilderEntry) + slen + mds +
  405. sizeof (uint32_t));
  406. ser = (char *) &e[1];
  407. memcpy (ser, uris, slen);
  408. GNUNET_free (uris);
  409. sptr = &ser[slen + sizeof (uint32_t)];
  410. ret =
  411. GNUNET_CONTAINER_meta_data_serialize (meta_use, &sptr, mds,
  412. GNUNET_CONTAINER_META_DATA_SERIALIZE_PART);
  413. if (NULL != meta)
  414. GNUNET_CONTAINER_meta_data_destroy (meta);
  415. if (ret == -1)
  416. mds = 0;
  417. else
  418. mds = ret;
  419. big = htonl (mds);
  420. memcpy (&ser[slen], &big, sizeof (uint32_t));
  421. e->len = slen + sizeof (uint32_t) + mds;
  422. e->next = bld->head;
  423. bld->head = e;
  424. bld->count++;
  425. }
  426. /**
  427. * Given the start and end position of a block of
  428. * data, return the end position of that data
  429. * after alignment to the DBLOCK_SIZE.
  430. */
  431. static size_t
  432. do_align (size_t start_position, size_t end_position)
  433. {
  434. size_t align;
  435. align = (end_position / DBLOCK_SIZE) * DBLOCK_SIZE;
  436. if ((start_position < align) && (end_position > align))
  437. return align + end_position - start_position;
  438. return end_position;
  439. }
  440. /**
  441. * Compute a permuation of the blocks to
  442. * minimize the cost of alignment. Greedy packer.
  443. *
  444. * @param start starting position for the first block
  445. * @param count size of the two arrays
  446. * @param sizes the sizes of the individual blocks
  447. * @param perm the permutation of the blocks (updated)
  448. */
  449. static void
  450. block_align (size_t start, unsigned int count, const size_t * sizes,
  451. unsigned int *perm)
  452. {
  453. unsigned int i;
  454. unsigned int j;
  455. unsigned int tmp;
  456. unsigned int best;
  457. ssize_t badness;
  458. size_t cpos;
  459. size_t cend;
  460. ssize_t cbad;
  461. unsigned int cval;
  462. cpos = start;
  463. for (i = 0; i < count; i++)
  464. {
  465. start = cpos;
  466. badness = 0x7FFFFFFF;
  467. best = -1;
  468. for (j = i; j < count; j++)
  469. {
  470. cval = perm[j];
  471. cend = cpos + sizes[cval];
  472. if (cpos % DBLOCK_SIZE == 0)
  473. {
  474. /* prefer placing the largest blocks first */
  475. cbad = -(cend % DBLOCK_SIZE);
  476. }
  477. else
  478. {
  479. if (cpos / DBLOCK_SIZE == cend / DBLOCK_SIZE)
  480. {
  481. /* Data fits into the same block! Prefer small left-overs! */
  482. cbad = DBLOCK_SIZE - cend % DBLOCK_SIZE;
  483. }
  484. else
  485. {
  486. /* Would have to waste space to re-align, add big factor, this
  487. * case is a real loss (proportional to space wasted)! */
  488. cbad = DBLOCK_SIZE * (DBLOCK_SIZE - cpos % DBLOCK_SIZE);
  489. }
  490. }
  491. if (cbad < badness)
  492. {
  493. best = j;
  494. badness = cbad;
  495. }
  496. }
  497. GNUNET_assert (best != -1);
  498. tmp = perm[i];
  499. perm[i] = perm[best];
  500. perm[best] = tmp;
  501. cpos += sizes[perm[i]];
  502. cpos = do_align (start, cpos);
  503. }
  504. }
  505. /**
  506. * Finish building the directory. Frees the
  507. * builder context and returns the directory
  508. * in-memory.
  509. *
  510. * @param bld directory to finish
  511. * @param rsize set to the number of bytes needed
  512. * @param rdata set to the encoded directory
  513. * @return GNUNET_OK on success
  514. */
  515. int
  516. GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
  517. size_t * rsize, void **rdata)
  518. {
  519. char *data;
  520. char *sptr;
  521. size_t *sizes;
  522. unsigned int *perm;
  523. unsigned int i;
  524. unsigned int j;
  525. struct BuilderEntry *pos;
  526. struct BuilderEntry **bes;
  527. size_t size;
  528. size_t psize;
  529. size_t off;
  530. ssize_t ret;
  531. uint32_t big;
  532. size = strlen (GNUNET_DIRECTORY_MAGIC) + sizeof (uint32_t);
  533. size += GNUNET_CONTAINER_meta_data_get_serialized_size (bld->meta);
  534. sizes = NULL;
  535. perm = NULL;
  536. bes = NULL;
  537. if (0 < bld->count)
  538. {
  539. sizes = GNUNET_malloc (bld->count * sizeof (size_t));
  540. perm = GNUNET_malloc (bld->count * sizeof (unsigned int));
  541. bes = GNUNET_malloc (bld->count * sizeof (struct BuilderEntry *));
  542. pos = bld->head;
  543. for (i = 0; i < bld->count; i++)
  544. {
  545. perm[i] = i;
  546. bes[i] = pos;
  547. sizes[i] = pos->len;
  548. pos = pos->next;
  549. }
  550. block_align (size, bld->count, sizes, perm);
  551. /* compute final size with alignment */
  552. for (i = 0; i < bld->count; i++)
  553. {
  554. psize = size;
  555. size += sizes[perm[i]];
  556. size = do_align (psize, size);
  557. }
  558. }
  559. *rsize = size;
  560. data = GNUNET_malloc_large (size);
  561. if (data == NULL)
  562. {
  563. GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "malloc");
  564. *rsize = 0;
  565. *rdata = NULL;
  566. GNUNET_free_non_null (sizes);
  567. GNUNET_free_non_null (perm);
  568. GNUNET_free_non_null (bes);
  569. return GNUNET_SYSERR;
  570. }
  571. *rdata = data;
  572. memcpy (data, GNUNET_DIRECTORY_MAGIC, strlen (GNUNET_DIRECTORY_MAGIC));
  573. off = strlen (GNUNET_DIRECTORY_MAGIC);
  574. sptr = &data[off + sizeof (uint32_t)];
  575. ret =
  576. GNUNET_CONTAINER_meta_data_serialize (bld->meta, &sptr,
  577. size - off - sizeof (uint32_t),
  578. GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL);
  579. GNUNET_assert (ret != -1);
  580. big = htonl (ret);
  581. memcpy (&data[off], &big, sizeof (uint32_t));
  582. off += sizeof (uint32_t) + ret;
  583. for (j = 0; j < bld->count; j++)
  584. {
  585. i = perm[j];
  586. psize = off;
  587. off += sizes[i];
  588. off = do_align (psize, off);
  589. memcpy (&data[off - sizes[i]], &(bes[i])[1], sizes[i]);
  590. GNUNET_free (bes[i]);
  591. }
  592. GNUNET_free_non_null (sizes);
  593. GNUNET_free_non_null (perm);
  594. GNUNET_free_non_null (bes);
  595. GNUNET_assert (off == size);
  596. GNUNET_CONTAINER_meta_data_destroy (bld->meta);
  597. GNUNET_free (bld);
  598. return GNUNET_OK;
  599. }
  600. /* end of fs_directory.c */