"Zone iteration finished. Rescheduling zone iteration\n");
namestore_iter = NULL;
- zone_update_taskid = GNUNET_SCHEDULER_add_now (&update_zone_dht_start, NULL);
+ if (num_public_records == 0)
+ zone_update_taskid = GNUNET_SCHEDULER_add_delayed (zone_iteration_interval,
+ &update_zone_dht_start,
+ NULL);
+ else
+ zone_update_taskid = GNUNET_SCHEDULER_add_now (&update_zone_dht_start, NULL);
GNUNET_STATISTICS_update (statistics,
"Number of zone iterations", 1, GNUNET_NO);
return;
}
- csh = GNUNET_malloc(sizeof(struct ClientShortenHandle));
+ csh = GNUNET_malloc(sizeof (struct ClientShortenHandle));
csh->client = client;
csh->unique_id = sh_msg->id;
GNUNET_STRINGS_utf8_tolower((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);
+ 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);
+ 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