aboutsummaryrefslogtreecommitdiff
path: root/src/namestore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-30 08:59:57 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-30 08:59:57 +0000
commit4a2bfd0f2a0c0dae8417d7b643ccf33250354d85 (patch)
tree018853b7e4d6f5831c0993b7beff5673d18fe06c /src/namestore
parent43fbcaa292318801523f8f3cd59bd39eebbb3808 (diff)
downloadgnunet-4a2bfd0f2a0c0dae8417d7b643ccf33250354d85.tar.gz
gnunet-4a2bfd0f2a0c0dae8417d7b643ccf33250354d85.zip
-fix indentation
Diffstat (limited to 'src/namestore')
-rw-r--r--src/namestore/gnunet-service-namestore.c96
1 files changed, 49 insertions, 47 deletions
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index e42591b61..266af5a20 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -613,15 +613,16 @@ handle_record_store (void *cls,
613 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 613 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
614 return; 614 return;
615 } 615 }
616 struct GNUNET_NAMESTORE_RecordData rd[rd_count]; 616 {
617 struct GNUNET_NAMESTORE_RecordData rd[rd_count];
617 618
618 if (GNUNET_OK != 619 if (GNUNET_OK !=
619 GNUNET_NAMESTORE_records_deserialize (rd_ser_len, rd_ser, rd_count, rd)) 620 GNUNET_NAMESTORE_records_deserialize (rd_ser_len, rd_ser, rd_count, rd))
620 { 621 {
621 GNUNET_break (0); 622 GNUNET_break (0);
622 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 623 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
623 return; 624 return;
624 } 625 }
625 626
626 /* Extracting and converting private key */ 627 /* Extracting and converting private key */
627 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&rp_msg->private_key, 628 GNUNET_CRYPTO_ecc_key_get_public_for_signature (&rp_msg->private_key,
@@ -647,46 +648,47 @@ handle_record_store (void *cls,
647 } 648 }
648 else 649 else
649 { 650 {
650 res = GSN_database->store_records (GSN_database->cls, 651 res = GSN_database->store_records (GSN_database->cls,
651 &rp_msg->private_key, 652 &rp_msg->private_key,
652 conv_name, 653 conv_name,
653 rd_count, rd); 654 rd_count, rd);
654 if (GNUNET_OK == res) 655 if (GNUNET_OK == res)
655 {
656 struct ZoneMonitor *zm;
657 struct GNUNET_NAMESTORE_Block *block;
658
659 if (0 == rd_count)
660 block = GNUNET_NAMESTORE_block_create (&rp_msg->private_key,
661 GNUNET_TIME_UNIT_ZERO_ABS,
662 conv_name,
663 rd, rd_count);
664 else
665 block = GNUNET_NAMESTORE_block_create (&rp_msg->private_key,
666 GNUNET_TIME_UNIT_FOREVER_ABS,
667 conv_name,
668 rd, rd_count);
669 if (GNUNET_OK !=
670 GSN_database->cache_block (GSN_database->cls,
671 block))
672 { 656 {
673 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 657 struct ZoneMonitor *zm;
674 _("Failed to cache encrypted block of my own zone!\n")); 658 struct GNUNET_NAMESTORE_Block *block;
675 res = GNUNET_SYSERR; 659
676 } 660 if (0 == rd_count)
677 GNUNET_free (block); 661 block = GNUNET_NAMESTORE_block_create (&rp_msg->private_key,
678 662 GNUNET_TIME_UNIT_ZERO_ABS,
679 for (zm = monitor_head; NULL != zm; zm = zm->next) 663 conv_name,
680 if (0 == memcmp (&rp_msg->private_key, &zm->zone, 664 rd, rd_count);
681 sizeof (struct GNUNET_CRYPTO_EccPrivateKey))) 665 else
682 send_lookup_response (monitor_nc, 666 block = GNUNET_NAMESTORE_block_create (&rp_msg->private_key,
683 zm->nc->client, 667 GNUNET_TIME_UNIT_FOREVER_ABS,
684 zm->request_id, 668 conv_name,
685 &rp_msg->private_key, 669 rd, rd_count);
686 conv_name, 670 if (GNUNET_OK !=
687 rd_count, rd); 671 GSN_database->cache_block (GSN_database->cls,
688 } 672 block))
689 GNUNET_free (conv_name); 673 {
674 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
675 _("Failed to cache encrypted block of my own zone!\n"));
676 res = GNUNET_SYSERR;
677 }
678 GNUNET_free (block);
679
680 for (zm = monitor_head; NULL != zm; zm = zm->next)
681 if (0 == memcmp (&rp_msg->private_key, &zm->zone,
682 sizeof (struct GNUNET_CRYPTO_EccPrivateKey)))
683 send_lookup_response (monitor_nc,
684 zm->nc->client,
685 zm->request_id,
686 &rp_msg->private_key,
687 conv_name,
688 rd_count, rd);
689 }
690 GNUNET_free (conv_name);
691 }
690 } 692 }
691 693
692 /* Send response */ 694 /* Send response */