gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r23573 - gnunet/src/gns
Date: Mon, 3 Sep 2012 15:25:23 +0200

Author: grothoff
Date: 2012-09-03 15:25:23 +0200 (Mon, 03 Sep 2012)
New Revision: 23573

Modified:
   gnunet/src/gns/gnunet-dns2gns.c
   gnunet/src/gns/gnunet-service-gns_resolver.c
Log:
better log message, fixing stale task

Modified: gnunet/src/gns/gnunet-dns2gns.c
===================================================================
--- gnunet/src/gns/gnunet-dns2gns.c     2012-09-03 13:13:25 UTC (rev 23572)
+++ gnunet/src/gns/gnunet-dns2gns.c     2012-09-03 13:25:23 UTC (rev 23573)
@@ -353,12 +353,12 @@
                  GNUNET_a2s (addr, addr_len));
       return;
     }
-  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
-                 "%d, %d, %d, %d\n",
-                 packet->flags.query_or_response,
-                 packet->num_answers,
-                 packet->num_authority_records,
-                 packet->num_additional_records);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Received request with flags %u, #answers %d, #auth %d, 
#additional %d\n",
+             (unsigned int) packet->flags.query_or_response,
+             (int) packet->num_answers,
+             (int) packet->num_authority_records,
+             (int) packet->num_additional_records);
   if ( (0 != packet->flags.query_or_response) || 
        (0 != packet->num_answers) ||
        (0 != packet->num_authority_records))

Modified: gnunet/src/gns/gnunet-service-gns_resolver.c
===================================================================
--- gnunet/src/gns/gnunet-service-gns_resolver.c        2012-09-03 13:13:25 UTC 
(rev 23572)
+++ gnunet/src/gns/gnunet-service-gns_resolver.c        2012-09-03 13:25:23 UTC 
(rev 23573)
@@ -920,15 +920,18 @@
              "GNS_NS: Error putting records into namestore: %s\n", emsg);
 }
 
+
 static void
 handle_lookup_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext 
*tc)
 {
   struct ResolverHandle *rh = cls;
 
-  if (rh->timeout_cont)
+  if (NULL != rh->timeout_cont)
     rh->timeout_cont (rh->timeout_cont_cls, tc);
+  /* FIXME: does this leak memory? */
 }
 
+
 /**
  * Processor for background lookups in the DHT
  *
@@ -3473,8 +3476,10 @@
                                                       &rh->authority))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                    "Cannot convert ZKEY %s to hash!\n", string_hash);
+                    "Cannot convert ZKEY `%s' to hash!\n", string_hash);
         
+       if (GNUNET_SCHEDULER_NO_TASK != rh->timeout_task)
+         GNUNET_SCHEDULER_cancel (rh->timeout_task);
         GNUNET_CONTAINER_DLL_remove (rlh_head, rlh_tail, rh);
         GNUNET_free (rh);
         GNUNET_free (rlh);




reply via email to

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