- * Periodically iterate over our zone and store everything in dht
- *
- * @param cls NULL
- * @param tc task context
- */
-static void
-update_zone_dht_start(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
-{
- zone_update_taskid = GNUNET_SCHEDULER_NO_TASK;
-
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Scheduling DHT zone update!\n");
-
- /* start counting again */
- num_public_records = 0;
- namestore_iter = GNUNET_NAMESTORE_zone_iteration_start (namestore_handle,
- NULL, //All zones
- GNUNET_NAMESTORE_RF_AUTHORITY,
- GNUNET_NAMESTORE_RF_PRIVATE,
- &put_gns_record,
- NULL);
-}
-
-/* END DHT ZONE PROPAGATION */
-
-/**
- * Send shorten response back to client
- *
- * @param cls the closure containing a client shorten handle
- * @param name the shortened name result or NULL if cannot be shortened
- */
-static void
-send_shorten_response(void* cls, const char* name)
-{
- struct ClientShortenHandle *csh = cls;
- struct GNUNET_GNS_ClientShortenResultMessage *rmsg;
- size_t name_len;
-
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending `%s' message with %s\n",
- "SHORTEN_RESULT", name);
- if (NULL == name)
- name_len = 0;
- else
- name_len = strlen (name) + 1;
- GNUNET_STATISTICS_update (statistics,
- "Name shorten results", 1, GNUNET_NO);
-
- rmsg = GNUNET_malloc(sizeof(struct GNUNET_GNS_ClientShortenResultMessage) +
- name_len);
-
- rmsg->id = csh->unique_id;
- rmsg->header.type = htons(GNUNET_MESSAGE_TYPE_GNS_SHORTEN_RESULT);
- rmsg->header.size =
- htons(sizeof(struct GNUNET_GNS_ClientShortenResultMessage) +
- name_len);
- memcpy (&rmsg[1], name, name_len);
-
- GNUNET_SERVER_notification_context_unicast (nc, csh->client,
- &rmsg->header,
- GNUNET_NO);
- GNUNET_SERVER_receive_done (csh->client, GNUNET_OK);
- if (NULL != csh->namestore_task)
- GNUNET_NAMESTORE_cancel (csh->namestore_task);
- GNUNET_free (rmsg);
- GNUNET_free (csh);
-}
-
-
-/**
- * Lookup the zone infos and shorten name
- *
- * @param cls the client shorten handle
- * @param key key of the zone
- * @param expiration expiration of record
- * @param name name found or null if no result
- * @param rd_count number of records found
- * @param rd record data
- * @param signature