aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-namestore-fcfsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/gnunet-namestore-fcfsd.c')
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c
index 844f4a990..22d108067 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -349,7 +349,8 @@ iterate_cb (void *cls,
349 return; 349 return;
350 } 350 }
351 351
352 if (GNUNET_GNSRECORD_TYPE_PKEY != rd->record_type) 352 if ((GNUNET_GNSRECORD_TYPE_PKEY != rd->record_type) &&
353 (GNUNET_GNSRECORD_TYPE_EDKEY != rd->record_type))
353 { 354 {
354 GNUNET_NAMESTORE_zone_iterator_next (zr->list_it, 355 GNUNET_NAMESTORE_zone_iterator_next (zr->list_it,
355 1); 356 1);
@@ -621,6 +622,7 @@ zone_to_name_cb (void *cls,
621{ 622{
622 struct Request *request = cls; 623 struct Request *request = cls;
623 struct GNUNET_GNSRECORD_Data r; 624 struct GNUNET_GNSRECORD_Data r;
625 char *rdata;
624 626
625 (void) rd; 627 (void) rd;
626 (void) zone_key; 628 (void) zone_key;
@@ -635,10 +637,21 @@ zone_to_name_cb (void *cls,
635 run_httpd_now (); 637 run_httpd_now ();
636 return; 638 return;
637 } 639 }
638 r.data = &request->pub; 640 if (GNUNET_OK != GNUNET_GNSRECORD_data_from_identity (&request->pub,
639 r.data_size = sizeof(request->pub); 641 &rdata,
642 &r.data_size,
643 &r.record_type))
644 {
645 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
646 _ ("Error creating record data.\n"));
647 request->phase = RP_FAIL;
648 MHD_resume_connection (request->con);
649 run_httpd_now ();
650 return;
651 }
652
653 r.data = rdata;
640 r.expiration_time = UINT64_MAX; 654 r.expiration_time = UINT64_MAX;
641 r.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
642 r.flags = GNUNET_GNSRECORD_RF_NONE; 655 r.flags = GNUNET_GNSRECORD_RF_NONE;
643 request->qe = GNUNET_NAMESTORE_records_store (ns, 656 request->qe = GNUNET_NAMESTORE_records_store (ns,
644 &fcfs_zone_pkey, 657 &fcfs_zone_pkey,
@@ -646,6 +659,7 @@ zone_to_name_cb (void *cls,
646 1, &r, 659 1, &r,
647 &put_continuation, 660 &put_continuation,
648 request); 661 request);
662 GNUNET_free (rdata);
649} 663}
650 664
651 665