- GNUNET_CLIENT_receive (gic->client,
- &handle_index_info,
- gic,
- GNUNET_CONSTANTS_SERVICE_TIMEOUT);
-}
-
-
-/**
- * Transmit the request to get a list of all
- * indexed files to the "FS" service.
- *
- * @param cls closure (of type "struct GetIndexedContext*")
- * @param size number of bytes availabe in buf
- * @param buf where to write the message, NULL on error
- * @return number of bytes written to buf
- */
-static size_t
-transmit_get_indexed (void *cls,
- size_t size,
- void *buf)
-{
- struct GetIndexedContext *gic = cls;
- struct GNUNET_MessageHeader *hdr;
-
- if (NULL == buf)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- _("Failed to transmit `%s' request to `%s' service.\n"),
- "GET_INDEXED",
- "fs");
- GNUNET_SCHEDULER_add_continuation (gic->h->sched,
- GNUNET_NO,
- gic->cont,
- gic->cont_cls,
- GNUNET_SCHEDULER_REASON_TIMEOUT);
- GNUNET_CLIENT_disconnect (gic->client);
- GNUNET_free (gic);
- return 0;
- }
- GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader));
- hdr = buf;
- hdr->size = htons (sizeof (struct GNUNET_MessageHeader));
- hdr->type = htons (GNUNET_MESSAGE_TYPE_FS_INDEX_LIST_GET);
- GNUNET_CLIENT_receive (gic->client,
- &handle_index_info,
- gic,
- GNUNET_CONSTANTS_SERVICE_TIMEOUT);
- return sizeof (struct GNUNET_MessageHeader);