gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r22487 - gnunet/src/gns
Date: Wed, 4 Jul 2012 21:24:57 +0200

Author: schanzen
Date: 2012-07-04 21:24:57 +0200 (Wed, 04 Jul 2012)
New Revision: 22487

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

Modified: gnunet/src/gns/gnunet-service-gns_resolver.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.c        2012-07-04 18:44:29 UTC 
(rev 22486)
+++ gnunet/src/gns/gnunet-service-gns_resolver.c        2012-07-04 19:24:57 UTC 
(rev 22487)
@@ -3471,7 +3471,7 @@
    * If we have found some records for the LAST label
    * we return the results. Else null.
    */
-  if (strcmp(rh->name, "") == 0)
+  if (strcmp (rh->name, "") == 0)
   {
     /* Start shortening */
     if ((rh->priv_key != NULL) && is_canonical (rh->name))
@@ -3483,15 +3483,18 @@
                     rh->priv_key);
     }
     /* simply promote back */
-    GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
-               "GNS_PHASE_DELEGATE_NS-%llu: Promoting %s back to name\n",
-               rh->id, rh->authority_name);
-    strcpy(rh->name, rh->authority_name);
-    rh->proc(rh->proc_cls, rh, rd_count, rd);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "GNS_PHASE_DELEGATE_NS-%llu: Promoting %s back to name\n",
+                rh->id, rh->authority_name);
+    strcpy (rh->name, rh->authority_name);
+    rh->proc (rh->proc_cls, rh, rd_count, rd);
   }
   else
   {
-    rh->proc(rh->proc_cls, rh, 0, NULL);
+    GNUNET_snprintf (new_name, MAX_DNS_NAME_LENGTH,
+                     "%s.%s", rh->name, rh->authority_name);
+    strcpy (rh->name, new_name);
+    rh->proc (rh->proc_cls, rh, 0, NULL);
   }
 }
 




reply via email to

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