- GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
- return;
- }
- 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 (utf_in, &nameptr);
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "SHORTEN: Converted `%s' to `%s'\n",
- utf_in,
- 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\n", name);
- GNUNET_CONTAINER_DLL_remove (csh_head, csh_tail, csh);
- send_shorten_response(csh, name);
- GNUNET_SERVER_receive_done (client, GNUNET_OK);
- return;
- }
- if (strlen (name) > MAX_DNS_NAME_LENGTH)
- {
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
- "SHORTEN: %s is too long\n", name);
- GNUNET_CONTAINER_DLL_remove (csh_head, csh_tail, csh);
- send_shorten_response(csh, name);
- GNUNET_SERVER_receive_done (client, GNUNET_OK);
- return;
- }
- if ( (! is_gnunet_tld (name)) &&
- (! is_zkey_tld (name)) )
- {
- 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);
- GNUNET_SERVER_receive_done (client, GNUNET_OK);
- return;