aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-10 19:55:30 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-10 19:55:30 +0200
commit9e1586de67362991a11e0d902f9a3deafbdba514 (patch)
tree31ad3f2454822dcfe4b408a03b43a4f0cd4e1e63
parente9a48662fd0c3393a593b762769a3cfd26400a34 (diff)
downloadgnunet-9e1586de67362991a11e0d902f9a3deafbdba514.tar.gz
gnunet-9e1586de67362991a11e0d902f9a3deafbdba514.zip
some code cleanup
-rw-r--r--src/dns/.gitignore1
-rw-r--r--src/namestore/gnunet-service-namestore.c39
2 files changed, 36 insertions, 4 deletions
diff --git a/src/dns/.gitignore b/src/dns/.gitignore
index 952f6fb9a..f045f806a 100644
--- a/src/dns/.gitignore
+++ b/src/dns/.gitignore
@@ -3,3 +3,4 @@ gnunet-dns-monitor
3gnunet-dns-redirector 3gnunet-dns-redirector
4gnunet-helper-dns 4gnunet-helper-dns
5test_hexcoder 5test_hexcoder
6gnunet-zoneimport
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index f967881ec..3a3291c07 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -256,6 +256,7 @@ cleanup_task (void *cls)
256{ 256{
257 struct CacheOperation *cop; 257 struct CacheOperation *cop;
258 258
259 (void) cls;
259 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 260 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
260 "Stopping namestore service\n"); 261 "Stopping namestore service\n");
261 while (NULL != (cop = cop_head)) 262 while (NULL != (cop = cop_head))
@@ -300,6 +301,7 @@ client_disconnect_cb (void *cls,
300 struct ZoneMonitor *zm; 301 struct ZoneMonitor *zm;
301 struct CacheOperation *cop; 302 struct CacheOperation *cop;
302 303
304 (void) cls;
303 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 305 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
304 "Client %p disconnected\n", 306 "Client %p disconnected\n",
305 client); 307 client);
@@ -348,6 +350,7 @@ client_connect_cb (void *cls,
348{ 350{
349 struct NamestoreClient *nc; 351 struct NamestoreClient *nc;
350 352
353 (void) cls;
351 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 354 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
352 "Client %p connected\n", 355 "Client %p connected\n",
353 client); 356 client);
@@ -378,6 +381,7 @@ lookup_nick_it (void *cls,
378{ 381{
379 struct GNUNET_GNSRECORD_Data **res = cls; 382 struct GNUNET_GNSRECORD_Data **res = cls;
380 383
384 (void) private_key;
381 if (0 != strcmp (label, GNUNET_GNS_MASTERZONE_STR)) 385 if (0 != strcmp (label, GNUNET_GNS_MASTERZONE_STR))
382 { 386 {
383 GNUNET_break (0); 387 GNUNET_break (0);
@@ -707,20 +711,42 @@ refresh_block (struct NamestoreClient *nc,
707 */ 711 */
708struct RecordLookupContext 712struct RecordLookupContext
709{ 713{
714
715 /**
716 * FIXME.
717 */
710 const char *label; 718 const char *label;
711 719
720 /**
721 * FIXME.
722 */
723 char *res_rd;
724
725 /**
726 * FIXME.
727 */
728 struct GNUNET_GNSRECORD_Data *nick;
729
730 /**
731 * FIXME.
732 */
712 int found; 733 int found;
713 734
735 /**
736 * FIXME.
737 */
714 unsigned int res_rd_count; 738 unsigned int res_rd_count;
715 739
740 /**
741 * FIXME.
742 */
716 size_t rd_ser_len; 743 size_t rd_ser_len;
717
718 char *res_rd;
719
720 struct GNUNET_GNSRECORD_Data *nick;
721}; 744};
722 745
723 746
747/**
748 * FIXME.
749 */
724static void 750static void
725lookup_it (void *cls, 751lookup_it (void *cls,
726 const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key, 752 const struct GNUNET_CRYPTO_EcdsaPrivateKey *private_key,
@@ -732,6 +758,7 @@ lookup_it (void *cls,
732 struct GNUNET_GNSRECORD_Data *rd_res; 758 struct GNUNET_GNSRECORD_Data *rd_res;
733 unsigned int rdc_res; 759 unsigned int rdc_res;
734 760
761 (void) private_key;
735 if (0 == strcmp (label, rlc->label)) 762 if (0 == strcmp (label, rlc->label))
736 { 763 {
737 rlc->found = GNUNET_YES; 764 rlc->found = GNUNET_YES;
@@ -799,6 +826,7 @@ check_record_lookup (void *cls,
799 size_t src_size; 826 size_t src_size;
800 const char *name_tmp; 827 const char *name_tmp;
801 828
829 (void) cls;
802 name_len = ntohl (ll_msg->label_len); 830 name_len = ntohl (ll_msg->label_len);
803 src_size = ntohs (ll_msg->gns_header.header.size); 831 src_size = ntohs (ll_msg->gns_header.header.size);
804 if (name_len != src_size - sizeof (struct LabelLookupMessage)) 832 if (name_len != src_size - sizeof (struct LabelLookupMessage))
@@ -907,6 +935,7 @@ check_record_store (void *cls,
907 size_t rd_ser_len; 935 size_t rd_ser_len;
908 const char *name_tmp; 936 const char *name_tmp;
909 937
938 (void) cls;
910 name_len = ntohs (rp_msg->name_len); 939 name_len = ntohs (rp_msg->name_len);
911 msg_size = ntohs (rp_msg->gns_header.header.size); 940 msg_size = ntohs (rp_msg->gns_header.header.size);
912 rd_ser_len = ntohs (rp_msg->rd_len); 941 rd_ser_len = ntohs (rp_msg->rd_len);
@@ -1617,6 +1646,8 @@ run (void *cls,
1617{ 1646{
1618 char *database; 1647 char *database;
1619 1648
1649 (void) cls;
1650 (void) service;
1620 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1651 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1621 "Starting namestore service\n"); 1652 "Starting namestore service\n");
1622 GSN_cfg = cfg; 1653 GSN_cfg = cfg;