/* FIXME: keep return value to possibly cancel? */
GNUNET_DHT_put (dht_handle, &xor_hash,
DHT_GNS_REPLICATION_LEVEL,
- GNUNET_DHT_RO_NONE,
+ GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE,
GNUNET_BLOCK_TYPE_GNS_NAMERECORD,
rd_payload_length,
(char*)nrb,
return;
}
- csh = GNUNET_malloc(sizeof(struct ClientShortenHandle));
+ csh = GNUNET_malloc(sizeof (struct ClientShortenHandle));
csh->client = client;
csh->unique_id = sh_msg->id;
GNUNET_CONTAINER_DLL_insert (csh_head, csh_tail, csh);
GNUNET_STRINGS_utf8_tolower((char*)&sh_msg[1], &nameptr);
-
+ GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
+ "SHORTEN: Converted %s to %s\n", (char*)&sh_msg[1], nameptr);
+ GNUNET_SERVER_notification_context_add (nc, client);
+
if (strlen (name) < strlen(GNUNET_GNS_TLD)) {
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "SHORTEN: %s is too short", name);
+ "SHORTEN: %s is too short\n", name);
+ GNUNET_CONTAINER_DLL_remove (csh_head, csh_tail, csh);
send_shorten_response(csh, name);
return;
}
if (strlen (name) > MAX_DNS_NAME_LENGTH) {
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "SHORTEN: %s is too long", name);
+ "SHORTEN: %s is too long\n", name);
+ GNUNET_CONTAINER_DLL_remove (csh_head, csh_tail, csh);
send_shorten_response(csh, name);
return;
}
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"%s is not our domain. Returning\n", name);
+ GNUNET_CONTAINER_DLL_remove (csh_head, csh_tail, csh);
send_shorten_response(csh, name);
return;
}
strcpy (csh->name, name);
- GNUNET_SERVER_notification_context_add (nc, client);
if (1 == ntohl(sh_msg->use_default_zone))
csh->root_zone = zone_hash; //Default zone