gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r23821 - gnunet/src/gns


From: gnunet
Subject: [GNUnet-SVN] r23821 - gnunet/src/gns
Date: Fri, 14 Sep 2012 18:26:33 +0200

Author: schanzen
Date: 2012-09-14 18:26:33 +0200 (Fri, 14 Sep 2012)
New Revision: 23821

Modified:
   gnunet/src/gns/gnunet-service-gns.c
   gnunet/src/gns/gnunet-service-gns_resolver.c
Log:
-fix

Modified: gnunet/src/gns/gnunet-service-gns.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns.c 2012-09-14 16:23:18 UTC (rev 23820)
+++ gnunet/src/gns/gnunet-service-gns.c 2012-09-14 16:26:33 UTC (rev 23821)
@@ -842,12 +842,13 @@
   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;
@@ -855,7 +856,7 @@
 
   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;

Modified: gnunet/src/gns/gnunet-service-gns_resolver.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.c        2012-09-14 16:23:18 UTC 
(rev 23820)
+++ gnunet/src/gns/gnunet-service-gns_resolver.c        2012-09-14 16:26:33 UTC 
(rev 23821)
@@ -3690,8 +3690,11 @@
   }
   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,
@@ -3800,8 +3803,11 @@
     }
     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,
@@ -3919,8 +3925,11 @@
     }
     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,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]