aboutsummaryrefslogtreecommitdiff
path: root/src/cli/namestore/gnunet-namestore-zonefile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/namestore/gnunet-namestore-zonefile.c')
-rw-r--r--src/cli/namestore/gnunet-namestore-zonefile.c40
1 files changed, 3 insertions, 37 deletions
diff --git a/src/cli/namestore/gnunet-namestore-zonefile.c b/src/cli/namestore/gnunet-namestore-zonefile.c
index dfd438e94..d43e88006 100644
--- a/src/cli/namestore/gnunet-namestore-zonefile.c
+++ b/src/cli/namestore/gnunet-namestore-zonefile.c
@@ -184,21 +184,6 @@ do_shutdown (void *cls)
184} 184}
185 185
186static void 186static void
187tx_end (void *cls, enum GNUNET_ErrorCode ec)
188{
189 ns_qe = NULL;
190 if (GNUNET_EC_NONE != ec)
191 {
192 fprintf (stderr,
193 _ ("Ego `%s' not known to identity service\n"),
194 ego_name);
195 GNUNET_SCHEDULER_shutdown ();
196 ret = -1;
197 }
198 GNUNET_SCHEDULER_shutdown ();
199}
200
201static void
202parse (void *cls); 187parse (void *cls);
203 188
204static char* 189static char*
@@ -602,7 +587,7 @@ parse (void *cls)
602 } 587 }
603 if (rd_count > 0) 588 if (rd_count > 0)
604 { 589 {
605 ns_qe = GNUNET_NAMESTORE_records_store (ns, 590 ns_qe = GNUNET_NAMESTORE_record_set_store (ns,
606 &zone_pkey, 591 &zone_pkey,
607 lastname, 592 lastname,
608 rd_count, 593 rd_count,
@@ -642,26 +627,9 @@ parse (void *cls)
642 } 627 }
643 printf ("Published %u records sets with total %u records\n", 628 printf ("Published %u records sets with total %u records\n",
644 published_sets, published_records); 629 published_sets, published_records);
645 ns_qe = GNUNET_NAMESTORE_transaction_commit (ns, 630 GNUNET_SCHEDULER_shutdown ();
646 &tx_end,
647 NULL);
648} 631}
649 632
650static void
651tx_start (void *cls, enum GNUNET_ErrorCode ec)
652{
653 ns_qe = NULL;
654 if (GNUNET_EC_NONE != ec)
655 {
656 fprintf (stderr,
657 _ ("Ego `%s' not known to identity service\n"),
658 ego_name);
659 GNUNET_SCHEDULER_shutdown ();
660 ret = -1;
661 return;
662 }
663 parse_task = GNUNET_SCHEDULER_add_now (&parse, NULL);
664}
665 633
666static void 634static void
667identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego) 635identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
@@ -684,9 +652,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
684 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); 652 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
685 sprintf (origin, "%s.", ego_name); 653 sprintf (origin, "%s.", ego_name);
686 state = ZS_ORIGIN_SET; 654 state = ZS_ORIGIN_SET;
687 ns_qe = GNUNET_NAMESTORE_transaction_begin (ns, 655 parse_task = GNUNET_SCHEDULER_add_now (&parse, NULL);
688 &tx_start,
689 NULL);
690} 656}
691 657
692 658