aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2012-02-24 16:37:32 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2012-02-24 16:37:32 +0000
commit59abfa3ceafffc4d65965571cd9a574ac190d608 (patch)
tree9edb657bd4b8da02d18f6e280f7537bf11a9d24f /src
parentef3ab57bc87489dffddc25714196198a01115bba (diff)
downloadgnunet-59abfa3ceafffc4d65965571cd9a574ac190d608.tar.gz
gnunet-59abfa3ceafffc4d65965571cd9a574ac190d608.zip
-fix
Diffstat (limited to 'src')
-rw-r--r--src/gns/gnunet-service-gns.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c
index d6989cb6a..5454a4ec6 100644
--- a/src/gns/gnunet-service-gns.c
+++ b/src/gns/gnunet-service-gns.c
@@ -607,7 +607,7 @@ reply_to_dns(struct GNUNET_GNS_ResolverHandle *rh, uint32_t rd_count,
607 * FIXME how to handle auth, additional etc 607 * FIXME how to handle auth, additional etc
608 * PKEY might be auth, != name,record_type additional 608 * PKEY might be auth, != name,record_type additional
609 **/ 609 **/
610 packet->num_queries = 0; 610 //packet->num_queries = 0;
611 packet->num_additional_records = 0; 611 packet->num_additional_records = 0;
612 packet->num_answers = rd_count; //answer->num_records; 612 packet->num_answers = rd_count; //answer->num_records;
613 //packet.num_authority_records = 0;//answer->num_authority_records; 613 //packet.num_authority_records = 0;//answer->num_authority_records;
@@ -682,13 +682,13 @@ process_authoritative_result(void* cls,
682 const struct GNUNET_NAMESTORE_RecordData *rd, 682 const struct GNUNET_NAMESTORE_RecordData *rd,
683 const struct GNUNET_CRYPTO_RsaSignature *signature) 683 const struct GNUNET_CRYPTO_RsaSignature *signature)
684{ 684{
685 struct GNUNET_GNS_ResolverHandle *query; 685 struct GNUNET_GNS_ResolverHandle *rh;
686 struct GNUNET_GNS_QueryRecordList *qrecord; 686 struct GNUNET_GNS_QueryRecordList *qrecord;
687 struct GNUNET_NAMESTORE_RecordData *record; 687 struct GNUNET_NAMESTORE_RecordData *record;
688 struct GNUNET_TIME_Relative remaining_time; 688 struct GNUNET_TIME_Relative remaining_time;
689 GNUNET_HashCode zone; 689 GNUNET_HashCode zone;
690 690
691 query = (struct GNUNET_GNS_ResolverHandle *) cls; 691 rh = (struct GNUNET_GNS_ResolverHandle *) cls;
692 GNUNET_CRYPTO_hash(key, GNUNET_CRYPTO_RSA_KEY_LENGTH, &zone); 692 GNUNET_CRYPTO_hash(key, GNUNET_CRYPTO_RSA_KEY_LENGTH, &zone);
693 remaining_time = GNUNET_TIME_absolute_get_remaining (expiration); 693 remaining_time = GNUNET_TIME_absolute_get_remaining (expiration);
694 694
@@ -713,7 +713,7 @@ process_authoritative_result(void* cls,
713 remaining_time = GNUNET_TIME_absolute_get_remaining (expiration); 713 remaining_time = GNUNET_TIME_absolute_get_remaining (expiration);
714 if (remaining_time.rel_value == 0) 714 if (remaining_time.rel_value == 0)
715 { 715 {
716 resolve_name_dht(query, name); 716 resolve_name_dht(rh, name);
717 return; 717 return;
718 } 718 }
719 else 719 else
@@ -726,8 +726,8 @@ process_authoritative_result(void* cls,
726 * Our zone and no result? Cannot resolve TT 726 * Our zone and no result? Cannot resolve TT
727 * FIXME modify query to say NX 727 * FIXME modify query to say NX
728 */ 728 */
729 GNUNET_assert(query->answered == 0); 729 GNUNET_assert(rh->answered == 0);
730 reply_to_dns(query, 0, NULL); //answered should be 0 730 reply_to_dns(rh, 0, NULL); //answered should be 0
731 return; 731 return;
732 732
733 } 733 }
@@ -743,7 +743,7 @@ process_authoritative_result(void* cls,
743 { 743 {
744 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, 744 GNUNET_log(GNUNET_ERROR_TYPE_DEBUG,
745 "This dht entry is old. Refreshing.\n"); 745 "This dht entry is old. Refreshing.\n");
746 resolve_name_dht(query, name); 746 resolve_name_dht(rh, name);
747 return; 747 return;
748 } 748 }
749 GNUNET_log(GNUNET_ERROR_TYPE_INFO, 749 GNUNET_log(GNUNET_ERROR_TYPE_INFO,
@@ -765,10 +765,10 @@ process_authoritative_result(void* cls,
765 765
766 //fixme into gns_util 766 //fixme into gns_util
767 //parse_record(rd[i]->data, rd[i]->data_size, 0, record); 767 //parse_record(rd[i]->data, rd[i]->data_size, 0, record);
768 GNUNET_CONTAINER_DLL_insert(query->records_head, 768 GNUNET_CONTAINER_DLL_insert(rh->records_head,
769 query->records_tail, 769 rh->records_tail,
770 qrecord); 770 qrecord);
771 query->num_records++; 771 rh->num_records++;
772 772
773 //TODO really? 773 //TODO really?
774 //we need to resolve to the original name in the end though... 774 //we need to resolve to the original name in the end though...
@@ -777,9 +777,9 @@ process_authoritative_result(void* cls,
777 } 777 }
778 778
779 GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Found answer to query!\n"); 779 GNUNET_log(GNUNET_ERROR_TYPE_INFO, "Found answer to query!\n");
780 query->answered = 1; 780 rh->answered = 1;
781 781
782 reply_to_dns(query, rd_count, rd); 782 reply_to_dns(rh, rd_count, rd);
783 } 783 }
784} 784}
785 785