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;
}
next_authority = rh->authority_chain_head;
- GNUNET_snprintf(tmp_name, MAX_DNS_NAME_LENGTH,
- "%s.%s", rh->name, next_authority->name);
+ if (0 == strcmp (rh->name, ""))
+ strcpy (tmp_name, next_authority->name);
+ else
+ GNUNET_snprintf(tmp_name, MAX_DNS_NAME_LENGTH,
+ "%s.%s", rh->name, next_authority->name);
strcpy(rh->name, tmp_name);
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
}
next_authority = rh->authority_chain_head;
- GNUNET_snprintf(tmp_name, MAX_DNS_NAME_LENGTH,
- "%s.%s", rh->name, next_authority->name);
+ if (0 == strcmp (rh->name, ""))
+ strcpy (tmp_name, next_authority->name);
+ else
+ GNUNET_snprintf(tmp_name, MAX_DNS_NAME_LENGTH,
+ "%s.%s", rh->name, next_authority->name);
strcpy(rh->name, tmp_name);
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
}
next_authority = rh->authority_chain_head;
- GNUNET_snprintf(tmp_name, MAX_DNS_NAME_LENGTH,
- "%s.%s", rh->name, next_authority->name);
+ if (0 == strcmp (rh->name, ""))
+ strcpy (tmp_name, next_authority->name);
+ else
+ GNUNET_snprintf(tmp_name, MAX_DNS_NAME_LENGTH,
+ "%s.%s", rh->name, next_authority->name);
strcpy(rh->name, tmp_name);
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,