gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27832 - gnunet/src/namestore


From: gnunet
Subject: [GNUnet-SVN] r27832 - gnunet/src/namestore
Date: Tue, 9 Jul 2013 16:37:13 +0200

Author: grothoff
Date: 2013-07-09 16:37:12 +0200 (Tue, 09 Jul 2013)
New Revision: 27832

Modified:
   gnunet/src/namestore/gnunet-service-namestore.c
   gnunet/src/namestore/namestore_api_monitor.c
   gnunet/src/namestore/test_namestore_api_monitoring.c
Log:
-fixes in monitoring code

Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c     2013-07-09 14:33:24 UTC 
(rev 27831)
+++ gnunet/src/namestore/gnunet-service-namestore.c     2013-07-09 14:37:12 UTC 
(rev 27832)
@@ -2020,9 +2020,10 @@
   }
   GNUNET_CONTAINER_DLL_insert (monitor_head, monitor_tail, zm);
   GNUNET_SERVER_client_mark_monitor (client);
+  GNUNET_SERVER_disable_receive_done_warning (client);
   GNUNET_SERVER_notification_context_add (monitor_nc,
                                          client);
-  zm->task = GNUNET_SCHEDULER_add_now (&monitor_next, zm);
+  zm->task = GNUNET_SCHEDULER_add_now (&monitor_next, zm);  
 }
 
 

Modified: gnunet/src/namestore/namestore_api_monitor.c
===================================================================
--- gnunet/src/namestore/namestore_api_monitor.c        2013-07-09 14:33:24 UTC 
(rev 27831)
+++ gnunet/src/namestore/namestore_api_monitor.c        2013-07-09 14:37:12 UTC 
(rev 27832)
@@ -205,10 +205,10 @@
                           &handle_updates,
                           zm,
                           GNUNET_TIME_UNIT_FOREVER_REL);
-    zm->monitor(zm->cls, 
-               &lrm->public_key, expire, 
-               name_tmp, 
-               rd_count, rd, &lrm->signature);
+    zm->monitor (zm->cls, 
+                &lrm->public_key, expire, 
+                name_tmp, 
+                rd_count, rd, NULL);
   }
 }
 
@@ -229,12 +229,15 @@
   struct GNUNET_NAMESTORE_ZoneMonitor *zm = cls;
   struct ZoneMonitorStartMessage sm;
 
+  zm->th = NULL;
   if (size < sizeof (struct ZoneMonitorStartMessage))
   {    
     reconnect (zm);
     return 0;
   }
- 
+  sm.gns_header.header.type = htons 
(GNUNET_MESSAGE_TYPE_NAMESTORE_MONITOR_START);
+  sm.gns_header.header.size = htons (sizeof (struct ZoneMonitorStartMessage));
+  sm.gns_header.r_id = htonl (0);
   sm.zone = zm->zone;
   sm.all_zones = htonl (zm->all_zones);
   memcpy (buf, &sm, sizeof (sm));

Modified: gnunet/src/namestore/test_namestore_api_monitoring.c
===================================================================
--- gnunet/src/namestore/test_namestore_api_monitoring.c        2013-07-09 
14:33:24 UTC (rev 27831)
+++ gnunet/src/namestore/test_namestore_api_monitoring.c        2013-07-09 
14:37:12 UTC (rev 27832)
@@ -159,28 +159,7 @@
           const struct GNUNET_NAMESTORE_RecordData *rd,
           const struct GNUNET_CRYPTO_EccSignature *signature)
 {
-  fprintf (stderr,
-          "Monitor cb for %s\n",
-          name);
-  if (GNUNET_OK != GNUNET_NAMESTORE_verify_signature (zone_key,
-                                                     expire, name, 
-                                                     rd_count, rd, 
-                                                     signature))
-  {
-    struct GNUNET_HashCode zone_key_hash;
-
-    GNUNET_CRYPTO_hash (zone_key, 
-                       sizeof (struct GNUNET_CRYPTO_EccPublicKeyBinaryEncoded),
-                       &zone_key_hash);
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
-               "Verifying signature for `%s' in zone `%s' with %u records  and 
expiration %llu failed\n", 
-               name, 
-               GNUNET_h2s(&zone_key_hash),
-               rd_count,
-               expire.abs_value);    
-    GNUNET_break (0);
-  }
-  
+  GNUNET_break (NULL == signature);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Comparing results name %s\n", 
              name);




reply via email to

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