[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
- [GNUnet-SVN] [gnunet] 04/14: W32: Fix a possible control flow error, (continued)
- [GNUnet-SVN] [gnunet] 04/14: W32: Fix a possible control flow error, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 12/14: Fix an initialization warning (GCC bug 53119), gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 06/14: W32: Fix wrong format strings, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 10/14: W32: Splice GNUNET_memcpy macro into NAT and GNS helpers, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 09/14: Silence a GCC warning in gnunet-nat.c, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 14/14: W32: Fix msg allocation in gns helper service, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 11/14: W32: cast ntohl() result to uint32_t, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 01/14: W32: adapt the code to GNUNET_memcpy() that returns nothing, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 02/14: Use GNU printf format, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 05/14: W32: Fix the conditaions for the ifconfig function, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 13/14: W32: port gnunet-gns-import to new zone iterator callback API,
gnunet <=
- [GNUnet-SVN] [gnunet] 03/14: Shuffle some vars around to fix a warning, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 07/14: W32: placate GCC by initializing lsocks_write_fd to NULL, gnunet, 2017/02/25
- [GNUnet-SVN] [gnunet] 08/14: Link libgnunetblockgroup to libgnunetblock, gnunet, 2017/02/25