gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 13/14: W32: port gnunet-gns-import to new zone ite


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 13/14: W32: port gnunet-gns-import to new zone iterator callback API
Date: Sat, 25 Feb 2017 22:05:03 +0100

This is an automated email from the git hooks/post-receive script.

lrn pushed a commit to branch master
in repository gnunet.

commit 320460014899596bd93f17cd8e968b393e8e5a85
Author: Руслан Ижбулатов <address@hidden>
AuthorDate: Sat Feb 25 12:56:57 2017 +0000

    W32: port gnunet-gns-import to new zone iterator callback API
---
 src/gns/gnunet-gns-import.c | 71 +++++++++++++++++++++++++--------------------
 1 file changed, 39 insertions(+), 32 deletions(-)

diff --git a/src/gns/gnunet-gns-import.c b/src/gns/gnunet-gns-import.c
index e98babfa8..49f6e495f 100644
--- a/src/gns/gnunet-gns-import.c
+++ b/src/gns/gnunet-gns-import.c
@@ -224,45 +224,52 @@ zone_iterator (void *cls,
     else if (0 == strcmp (rname, "pin"))
       check_pkey (rd_len, rd, pin_zone_pkey, &found_pin_rec);
   }
-  if (NULL == rname && 0 == rd_len && NULL == rd)
+  GNUNET_NAMESTORE_zone_iterator_next (list_it);
+}
+
+static void
+zone_iteration_error (void *cls)
+{
+  enum GNUNET_OS_ProcessStatusType st;
+  unsigned long code;
+  if (!found_private_rec)
   {
-    enum GNUNET_OS_ProcessStatusType st;
-    unsigned long code;
-    if (!found_private_rec)
+    if (0 != run_process_and_wait (GNUNET_NO, 
GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
+        "gnunet-namestore",
+        "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", 
"private", "-p", "-t", "PKEY", "-V", private_zone_pkey, NULL))
     {
-      if (0 != run_process_and_wait (GNUNET_NO, 
GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
-          "gnunet-namestore",
-          "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", 
"private", "-p", "-t", "PKEY", "-V", private_zone_pkey, NULL))
-      {
-        ret = 8;
-        return;
-      }
+      ret = 8;
+      return;
     }
-    if (!found_short_rec)
+  }
+  if (!found_short_rec)
+  {
+    if (0 != run_process_and_wait (GNUNET_NO, 
GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
+        "gnunet-namestore",
+        "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", 
"short", "-p", "-t", "PKEY", "-V", short_zone_pkey, NULL))
     {
-      if (0 != run_process_and_wait (GNUNET_NO, 
GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
-          "gnunet-namestore",
-          "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", 
"short", "-p", "-t", "PKEY", "-V", short_zone_pkey, NULL))
-      {
-        ret = 9;
-        return;
-      }
+      ret = 9;
+      return;
     }
-    if (!found_pin_rec)
+  }
+  if (!found_pin_rec)
+  {
+    if (0 != run_process_and_wait (GNUNET_NO, 
GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
+        "gnunet-namestore",
+        "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", 
"pin", "-p", "-t", "PKEY", "-V", pin_zone_pkey, NULL))
     {
-      if (0 != run_process_and_wait (GNUNET_NO, 
GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, &st, &code,
-          "gnunet-namestore",
-          "gnunet-namestore", "-z", "master-zone", "-a", "-e", "never", "-n", 
"pin", "-p", "-t", "PKEY", "-V", pin_zone_pkey, NULL))
-      {
-        ret = 10;
-        return;
-      }
+      ret = 10;
+      return;
     }
-    list_it = NULL;
-    GNUNET_SCHEDULER_shutdown ();
-    return;
   }
-  GNUNET_NAMESTORE_zone_iterator_next (list_it);
+  list_it = NULL;
+  GNUNET_SCHEDULER_shutdown ();
+}
+
+
+static void
+zone_iteration_finished (void *cls)
+{
 }
 
 
@@ -317,7 +324,7 @@ get_ego (void *cls,
       return;
     }
     list_it = GNUNET_NAMESTORE_zone_iteration_start (ns,
-        &master_pk, &zone_iterator, NULL);
+        &master_pk, &zone_iteration_error, NULL, &zone_iterator, NULL, 
&zone_iteration_finished, NULL);
     if (NULL == list_it)
     {
       ret = 12;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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