gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r30440 - gnunet/src/namestore
Date: Mon, 28 Oct 2013 16:24:50 +0100

Author: wachs
Date: 2013-10-28 16:24:50 +0100 (Mon, 28 Oct 2013)
New Revision: 30440

Modified:
   gnunet/src/namestore/gnunet-namestore.c
Log:
replace zone iteration with record lookup


Modified: gnunet/src/namestore/gnunet-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-namestore.c     2013-10-28 15:17:49 UTC (rev 
30439)
+++ gnunet/src/namestore/gnunet-namestore.c     2013-10-28 15:24:50 UTC (rev 
30440)
@@ -60,11 +60,6 @@
 static int add;
 
 /**
- * Iterator for the 'add' operation.
- */
-static struct GNUNET_NAMESTORE_ZoneIterator *add_zit;
-
-/**
  * Queue entry for the 'add-uri' operation.
  */
 static struct GNUNET_NAMESTORE_QueueEntry *add_qe_uri;
@@ -205,11 +200,6 @@
     GNUNET_NAMESTORE_zone_iteration_stop (list_it);
     list_it = NULL;
   }
-  if (NULL != add_zit)
-  {
-    GNUNET_NAMESTORE_zone_iteration_stop (add_zit);
-    add_zit = NULL;
-  }
   if (NULL != add_qe)
   {
     GNUNET_NAMESTORE_cancel (add_qe);
@@ -422,10 +412,11 @@
   struct GNUNET_GNSRECORD_Data rdn[rd_count + 1];
   struct GNUNET_GNSRECORD_Data *rde;
 
+  add_qe = NULL;
   if ( (NULL != zone_key) &&
        (0 != strcmp (rec_name, name)) )
   {
-    GNUNET_NAMESTORE_zone_iterator_next (add_zit);
+    GNUNET_break (0);
     return;
   }
   memset (rdn, 0, sizeof (struct GNUNET_GNSRECORD_Data));
@@ -458,11 +449,6 @@
                                           rde,
                                           &add_continuation,
                                           &add_qe);
-  /* only cancel if we were not told that this
-     was the end of the iteration already */
-  if (NULL != rec_name)
-    GNUNET_NAMESTORE_zone_iteration_stop (add_zit);
-  add_zit = NULL;
 }
 
 
@@ -621,10 +607,8 @@
       ret = 1;
       return;
     }
-    add_zit = GNUNET_NAMESTORE_zone_iteration_start (ns,
-                                                    &zone_pkey,
-                                                    &get_existing_record,
-                                                    NULL);
+    add_qe = GNUNET_NAMESTORE_records_lookup (ns, &zone_pkey, name,
+        &get_existing_record, NULL );
   }
   if (del)
   {




reply via email to

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