diff options
Diffstat (limited to 'src/gns/gnunet-service-gns_resolver.c')
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 207 |
1 files changed, 118 insertions, 89 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index ae01dafa9..de6e9ccc3 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -69,6 +69,8 @@ static unsigned long long max_allowed_background_queries; | |||
69 | */ | 69 | */ |
70 | static struct GNUNET_CRYPTO_ShortHashCode local_zone; | 70 | static struct GNUNET_CRYPTO_ShortHashCode local_zone; |
71 | 71 | ||
72 | static unsigned long long rid = 0; | ||
73 | |||
72 | /** | 74 | /** |
73 | * Namestore calls this function if we have record for this name. | 75 | * Namestore calls this function if we have record for this name. |
74 | * (or with rd_count=0 to indicate no matches) | 76 | * (or with rd_count=0 to indicate no matches) |
@@ -470,8 +472,8 @@ cleanup_pending_background_queries(void* cls, | |||
470 | ResolverCleanupContinuation cont = cls; | 472 | ResolverCleanupContinuation cont = cls; |
471 | 473 | ||
472 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 474 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
473 | "GNS_CLEANUP: Terminating background lookup for %s\n", | 475 | "GNS_CLEANUP-%d: Terminating background lookup for %s\n", |
474 | rh->name); | 476 | rh->id, rh->name); |
475 | GNUNET_DHT_get_stop(rh->get_handle); | 477 | GNUNET_DHT_get_stop(rh->get_handle); |
476 | rh->get_handle = NULL; | 478 | rh->get_handle = NULL; |
477 | rh->proc(rh->proc_cls, rh, 0, NULL); | 479 | rh->proc(rh->proc_cls, rh, 0, NULL); |
@@ -601,8 +603,8 @@ dht_lookup_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
601 | char new_name[MAX_DNS_NAME_LENGTH]; | 603 | char new_name[MAX_DNS_NAME_LENGTH]; |
602 | 604 | ||
603 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 605 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
604 | "GNS_PHASE_REC: dht lookup for query %s timed out.\n", | 606 | "GNS_PHASE_REC-%d: dht lookup for query %s (%ds)timed out.\n", |
605 | rh->name); | 607 | rh->id, rh->name, rh->timeout.rel_value); |
606 | /** | 608 | /** |
607 | * Start resolution in bg | 609 | * Start resolution in bg |
608 | */ | 610 | */ |
@@ -612,8 +614,8 @@ dht_lookup_timeout(void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
612 | rh->name, GNUNET_GNS_TLD); | 614 | rh->name, GNUNET_GNS_TLD); |
613 | 615 | ||
614 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 616 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
615 | "GNS_PHASE_REC: Starting background lookup for %s type %d\n", | 617 | "GNS_PHASE_REC-%d: Starting background lookup for %s type %d\n", |
616 | new_name, rlh->record_type); | 618 | rh->id, new_name, rlh->record_type); |
617 | 619 | ||
618 | gns_resolver_lookup_record(rh->authority, | 620 | gns_resolver_lookup_record(rh->authority, |
619 | rlh->record_type, | 621 | rlh->record_type, |
@@ -664,16 +666,17 @@ process_record_result_dht(void* cls, | |||
664 | char* rd_data = (char*)data; | 666 | char* rd_data = (char*)data; |
665 | int i; | 667 | int i; |
666 | int rd_size; | 668 | int rd_size; |
667 | 669 | ||
670 | rh = (struct ResolverHandle *)cls; | ||
668 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 671 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
669 | "GNS_PHASE_REC: got dht result (size=%d)\n", size); | 672 | "GNS_PHASE_REC-%d: got dht result (size=%d)\n", rh->id, size); |
670 | 673 | ||
671 | if (data == NULL) | 674 | if (data == NULL) |
672 | return; | 675 | return; |
673 | 676 | ||
674 | //FIXME maybe check expiration here, check block type | 677 | //FIXME maybe check expiration here, check block type |
675 | 678 | ||
676 | rh = (struct ResolverHandle *)cls; | 679 | |
677 | rlh = (struct RecordLookupHandle *) rh->proc_cls; | 680 | rlh = (struct RecordLookupHandle *) rh->proc_cls; |
678 | nrb = (struct GNSNameRecordBlock*)data; | 681 | nrb = (struct GNSNameRecordBlock*)data; |
679 | 682 | ||
@@ -707,21 +710,25 @@ process_record_result_dht(void* cls, | |||
707 | num_records, | 710 | num_records, |
708 | rd)) | 711 | rd)) |
709 | { | 712 | { |
710 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Error deserializing data!\n"); | 713 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
714 | "GNS_PHASE_REC-%d: Error deserializing data!\n", rh->id); | ||
711 | return; | 715 | return; |
712 | } | 716 | } |
713 | 717 | ||
714 | for (i=0; i<num_records; i++) | 718 | for (i=0; i<num_records; i++) |
715 | { | 719 | { |
716 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 720 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
717 | "GNS_PHASE_REC: Got name: %s (wanted %s)\n", name, rh->name); | 721 | "GNS_PHASE_REC-%d: Got name: %s (wanted %s)\n", |
722 | rh->id, name, rh->name); | ||
718 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 723 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
719 | "GNS_PHASE_REC: Got type: %d\n", | 724 | "GNS_PHASE_REC-%d: Got type: %d\n", |
720 | rd[i].record_type); | 725 | rh->id, rd[i].record_type); |
721 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 726 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
722 | "GNS_PHASE_REC: Got data length: %d\n", rd[i].data_size); | 727 | "GNS_PHASE_REC-%d: Got data length: %d\n", |
728 | rh->id, rd[i].data_size); | ||
723 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 729 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
724 | "GNS_PHASE_REC: Got flag %d\n", rd[i].flags); | 730 | "GNS_PHASE_REC-%d: Got flag %d\n", |
731 | rh->id, rd[i].flags); | ||
725 | 732 | ||
726 | if ((strcmp(name, rh->name) == 0) && | 733 | if ((strcmp(name, rh->name) == 0) && |
727 | (rd[i].record_type == rlh->record_type)) | 734 | (rd[i].record_type == rlh->record_type)) |
@@ -782,8 +789,8 @@ resolve_record_dht(struct ResolverHandle *rh) | |||
782 | GNUNET_CRYPTO_hash_to_enc (&lookup_key, &lookup_key_string); | 789 | GNUNET_CRYPTO_hash_to_enc (&lookup_key, &lookup_key_string); |
783 | 790 | ||
784 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 791 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
785 | "GNS_PHASE_REC: starting dht lookup for %s with key: %s\n", | 792 | "GNS_PHASE_REC-%d: starting dht lookup for %s with key: %s\n", |
786 | rh->name, (char*)&lookup_key_string); | 793 | rh->id, rh->name, (char*)&lookup_key_string); |
787 | 794 | ||
788 | //rh->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 795 | //rh->timeout_task = GNUNET_SCHEDULER_NO_TASK; |
789 | rh->dht_heap_node = NULL; | 796 | rh->dht_heap_node = NULL; |
@@ -797,7 +804,7 @@ resolve_record_dht(struct ResolverHandle *rh) | |||
797 | { | 804 | { |
798 | 805 | ||
799 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 806 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
800 | "GNS_PHASE_REC: Adjusting timeout\n"); | 807 | "GNS_PHASE_REC-%d: Adjusting timeout\n", rh->id); |
801 | /* | 808 | /* |
802 | * Set timeout for authority lookup phase to 1/2 | 809 | * Set timeout for authority lookup phase to 1/2 |
803 | */ | 810 | */ |
@@ -823,8 +830,8 @@ resolve_record_dht(struct ResolverHandle *rh) | |||
823 | rh_heap_root->dht_heap_node = NULL; | 830 | rh_heap_root->dht_heap_node = NULL; |
824 | 831 | ||
825 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 832 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
826 | "GNS_PHASE_REC: Replacing oldest background query for %s\n", | 833 | "GNS_PHASE_REC-%d: Replacing oldest background query for %s\n", |
827 | rh_heap_root->name); | 834 | rh->id, rh_heap_root->name); |
828 | rh_heap_root->proc(rh_heap_root->proc_cls, | 835 | rh_heap_root->proc(rh_heap_root->proc_cls, |
829 | rh_heap_root, | 836 | rh_heap_root, |
830 | 0, | 837 | 0, |
@@ -904,12 +911,12 @@ process_record_result_ns(void* cls, | |||
904 | * Lookup terminated and no results | 911 | * Lookup terminated and no results |
905 | */ | 912 | */ |
906 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 913 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
907 | "GNS_PHASE_REC: Namestore lookup for %s terminated without results\n", | 914 | "GNS_PHASE_REC-%d: Namestore lookup for %s terminated without results\n", |
908 | name); | 915 | rh->id, name); |
909 | 916 | ||
910 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 917 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
911 | "GNS_PHASE_REC: Record %s unknown in namestore\n", | 918 | "GNS_PHASE_REC-%d: Record %s unknown in namestore\n", |
912 | rh->name); | 919 | rh->id, rh->name); |
913 | /** | 920 | /** |
914 | * Our zone and no result? Cannot resolve TT | 921 | * Our zone and no result? Cannot resolve TT |
915 | */ | 922 | */ |
@@ -921,8 +928,8 @@ process_record_result_ns(void* cls, | |||
921 | { | 928 | { |
922 | 929 | ||
923 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 930 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
924 | "GNS_PHASE_REC: Processing additional result %s from namestore\n", | 931 | "GNS_PHASE_REC-%d: Processing additional result %s from namestore\n", |
925 | name); | 932 | rh->id, name); |
926 | int i; | 933 | int i; |
927 | for (i=0; i<rd_count;i++) | 934 | for (i=0; i<rd_count;i++) |
928 | { | 935 | { |
@@ -934,7 +941,8 @@ process_record_result_ns(void* cls, | |||
934 | == 0) | 941 | == 0) |
935 | { | 942 | { |
936 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 943 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
937 | "GNS_PHASE_REC: This record is expired. Skipping\n"); | 944 | "GNS_PHASE_REC-%d: This record is expired. Skipping\n", |
945 | rh->id); | ||
938 | continue; | 946 | continue; |
939 | } | 947 | } |
940 | 948 | ||
@@ -948,14 +956,14 @@ process_record_result_ns(void* cls, | |||
948 | if (rh->answered == 0) | 956 | if (rh->answered == 0) |
949 | { | 957 | { |
950 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 958 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
951 | "GNS_PHASE_REC: No answers found. This is odd!\n"); | 959 | "GNS_PHASE_REC-%d: No answers found. This is odd!\n", rh->id); |
952 | rh->proc(rh->proc_cls, rh, 0, NULL); | 960 | rh->proc(rh->proc_cls, rh, 0, NULL); |
953 | return; | 961 | return; |
954 | } | 962 | } |
955 | 963 | ||
956 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 964 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
957 | "GNS_PHASE_REC: Found %d answer(s) to query in %d records!\n", | 965 | "GNS_PHASE_REC-%d: Found %d answer(s) to query in %d records!\n", |
958 | rh->answered, rd_count); | 966 | rh->id, rh->answered, rd_count); |
959 | 967 | ||
960 | rh->proc(rh->proc_cls, rh, rd_count, rd); | 968 | rh->proc(rh->proc_cls, rh, rd_count, rd); |
961 | } | 969 | } |
@@ -1012,8 +1020,8 @@ dht_authority_lookup_timeout(void *cls, | |||
1012 | char new_name[MAX_DNS_NAME_LENGTH]; | 1020 | char new_name[MAX_DNS_NAME_LENGTH]; |
1013 | 1021 | ||
1014 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1022 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1015 | "GNS_PHASE_DELEGATE_DHT: dht lookup for query %s timed out.\n", | 1023 | "GNS_PHASE_DELEGATE_DHT-%d: dht lookup for query %s (%ds)timed out.\n", |
1016 | rh->authority_name); | 1024 | rh->id, rh->authority_name, rh->timeout.rel_value); |
1017 | 1025 | ||
1018 | rh->status |= TIMED_OUT; | 1026 | rh->status |= TIMED_OUT; |
1019 | 1027 | ||
@@ -1044,8 +1052,8 @@ dht_authority_lookup_timeout(void *cls, | |||
1044 | strcpy(rh->name, new_name); | 1052 | strcpy(rh->name, new_name); |
1045 | 1053 | ||
1046 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1054 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1047 | "GNS_PHASE_DELEGATE_DHT: Starting background query for %s type %d\n", | 1055 | "GNS_PHASE_DELEGATE_DHT-%d: Starting background query for %s type %d\n", |
1048 | rh->name, rlh->record_type); | 1056 | rh->id, rh->name, rlh->record_type); |
1049 | 1057 | ||
1050 | gns_resolver_lookup_record(rh->authority, | 1058 | gns_resolver_lookup_record(rh->authority, |
1051 | rlh->record_type, | 1059 | rlh->record_type, |
@@ -1115,16 +1123,15 @@ process_delegation_result_dht(void* cls, | |||
1115 | int rd_size; | 1123 | int rd_size; |
1116 | struct GNUNET_CRYPTO_ShortHashCode zone, name_hash; | 1124 | struct GNUNET_CRYPTO_ShortHashCode zone, name_hash; |
1117 | GNUNET_HashCode zone_hash_double, name_hash_double; | 1125 | GNUNET_HashCode zone_hash_double, name_hash_double; |
1126 | |||
1127 | rh = (struct ResolverHandle *)cls; | ||
1118 | 1128 | ||
1119 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1129 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1120 | "GNS_PHASE_DELEGATE_DHT: Got DHT result\n"); | 1130 | "GNS_PHASE_DELEGATE_DHT-%d: Got DHT result\n", rh->id); |
1121 | 1131 | ||
1122 | if (data == NULL) | 1132 | if (data == NULL) |
1123 | return; | 1133 | return; |
1124 | 1134 | ||
1125 | //FIXME check expiration? | ||
1126 | |||
1127 | rh = (struct ResolverHandle *)cls; | ||
1128 | nrb = (struct GNSNameRecordBlock*)data; | 1135 | nrb = (struct GNSNameRecordBlock*)data; |
1129 | 1136 | ||
1130 | /* stop dht lookup and timeout task */ | 1137 | /* stop dht lookup and timeout task */ |
@@ -1152,33 +1159,36 @@ process_delegation_result_dht(void* cls, | |||
1152 | rd)) | 1159 | rd)) |
1153 | { | 1160 | { |
1154 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, | 1161 | GNUNET_log(GNUNET_ERROR_TYPE_ERROR, |
1155 | "GNS_PHASE_DELEGATE_DHT: Error deserializing data!\n"); | 1162 | "GNS_PHASE_DELEGATE_DHT-%d: Error deserializing data!\n", |
1163 | rh->id); | ||
1156 | return; | 1164 | return; |
1157 | } | 1165 | } |
1158 | 1166 | ||
1159 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1167 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1160 | "GNS_PHASE_DELEGATE_DHT: Got name: %s (wanted %s)\n", | 1168 | "GNS_PHASE_DELEGATE_DHT-%d: Got name: %s (wanted %s)\n", |
1161 | name, rh->authority_name); | 1169 | rh->id, name, rh->authority_name); |
1162 | for (i=0; i<num_records; i++) | 1170 | for (i=0; i<num_records; i++) |
1163 | { | 1171 | { |
1164 | 1172 | ||
1165 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1173 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1166 | "GNS_PHASE_DELEGATE_DHT: Got name: %s (wanted %s)\n", | 1174 | "GNS_PHASE_DELEGATE_DHT-%d: Got name: %s (wanted %s)\n", |
1167 | name, rh->authority_name); | 1175 | rh->id, name, rh->authority_name); |
1168 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1176 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1169 | "GNS_PHASE_DELEGATE_DHT: Got type: %d (wanted %d)\n", | 1177 | "GNS_PHASE_DELEGATE_DHT-%d: Got type: %d (wanted %d)\n", |
1170 | rd[i].record_type, GNUNET_GNS_RECORD_PKEY); | 1178 | rh->id, rd[i].record_type, GNUNET_GNS_RECORD_PKEY); |
1171 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1179 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1172 | "GNS_PHASE_DELEGATE_DHT: Got data length: %d\n", | 1180 | "GNS_PHASE_DELEGATE_DHT-%d: Got data length: %d\n", |
1173 | rd[i].data_size); | 1181 | rh->id, rd[i].data_size); |
1174 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1182 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1175 | "GNS_PHASE_DELEGATE_DHT: Got flag %d\n", rd[i].flags); | 1183 | "GNS_PHASE_DELEGATE_DHT-%d: Got flag %d\n", |
1184 | rh->id, rd[i].flags); | ||
1176 | 1185 | ||
1177 | if ((strcmp(name, rh->authority_name) == 0) && | 1186 | if ((strcmp(name, rh->authority_name) == 0) && |
1178 | (rd[i].record_type == GNUNET_GNS_RECORD_PKEY)) | 1187 | (rd[i].record_type == GNUNET_GNS_RECORD_PKEY)) |
1179 | { | 1188 | { |
1180 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1189 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1181 | "GNS_PHASE_DELEGATE_DHT: Authority found in DHT\n"); | 1190 | "GNS_PHASE_DELEGATE_DHT-%d: Authority found in DHT\n", |
1191 | rh->id); | ||
1182 | rh->answered = 1; | 1192 | rh->answered = 1; |
1183 | memcpy(&rh->authority, rd[i].data, sizeof(struct GNUNET_CRYPTO_ShortHashCode)); | 1193 | memcpy(&rh->authority, rd[i].data, sizeof(struct GNUNET_CRYPTO_ShortHashCode)); |
1184 | struct AuthorityChain *auth = | 1194 | struct AuthorityChain *auth = |
@@ -1229,8 +1239,8 @@ process_delegation_result_dht(void* cls, | |||
1229 | * FIXME in this case. should we ask namestore again? | 1239 | * FIXME in this case. should we ask namestore again? |
1230 | */ | 1240 | */ |
1231 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1241 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1232 | "GNS_PHASE_DELEGATE_DHT: Answer from DHT for %s. Yet to resolve: %s\n", | 1242 | "GNS_PHASE_DELEGATE_DHT-%d: Answer from DHT for %s. Yet to resolve: %s\n", |
1233 | rh->authority_name, rh->name); | 1243 | rh->id, rh->authority_name, rh->name); |
1234 | if (strcmp(rh->name, "") == 0) | 1244 | if (strcmp(rh->name, "") == 0) |
1235 | { | 1245 | { |
1236 | rh->proc(rh->proc_cls, rh, 0, NULL); | 1246 | rh->proc(rh->proc_cls, rh, 0, NULL); |
@@ -1248,8 +1258,8 @@ process_delegation_result_dht(void* cls, | |||
1248 | * promote back | 1258 | * promote back |
1249 | */ | 1259 | */ |
1250 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1260 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1251 | "GNS_PHASE_DELEGATE_DHT: Adding %s back to %s\n", | 1261 | "GNS_PHASE_DELEGATE_DHT-%d: Adding %s back to %s\n", |
1252 | rh->authority_name, rh->name); | 1262 | rh->id, rh->authority_name, rh->name); |
1253 | if (strcmp(rh->name, "") == 0) | 1263 | if (strcmp(rh->name, "") == 0) |
1254 | strcpy(rh->name, rh->authority_name); | 1264 | strcpy(rh->name, rh->authority_name); |
1255 | else | 1265 | else |
@@ -1257,9 +1267,10 @@ process_delegation_result_dht(void* cls, | |||
1257 | rh->name, rh->authority_name); //FIXME ret | 1267 | rh->name, rh->authority_name); //FIXME ret |
1258 | 1268 | ||
1259 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1269 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1260 | "GNS_PHASE_DELEGATE_DHT: %s restored\n", rh->name); | 1270 | "GNS_PHASE_DELEGATE_DHT-%d: %s restored\n", rh->id, rh->name); |
1261 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1271 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1262 | "GNS_PHASE_DELEGATE_DHT: DHT authority lookup found no match!\n"); | 1272 | "GNS_PHASE_DELEGATE_DHT-%d: DHT authority lookup found no match!\n", |
1273 | rh->id); | ||
1263 | rh->proc(rh->proc_cls, rh, 0, NULL); | 1274 | rh->proc(rh->proc_cls, rh, 0, NULL); |
1264 | } | 1275 | } |
1265 | 1276 | ||
@@ -1416,8 +1427,8 @@ handle_record_dht(void* cls, struct ResolverHandle *rh, | |||
1416 | if (rd_count == 0) | 1427 | if (rd_count == 0) |
1417 | { | 1428 | { |
1418 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1429 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1419 | "GNS_PHASE_REC: No records for %s found in DHT. Aborting\n", | 1430 | "GNS_PHASE_REC-%d: No records for %s found in DHT. Aborting\n", |
1420 | rh->name); | 1431 | rh->id, rh->name); |
1421 | /* give up, cannot resolve */ | 1432 | /* give up, cannot resolve */ |
1422 | finish_lookup(rh, rlh, 0, NULL); | 1433 | finish_lookup(rh, rlh, 0, NULL); |
1423 | free_resolver_handle(rh); | 1434 | free_resolver_handle(rh); |
@@ -1426,7 +1437,7 @@ handle_record_dht(void* cls, struct ResolverHandle *rh, | |||
1426 | 1437 | ||
1427 | /* results found yay */ | 1438 | /* results found yay */ |
1428 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1439 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1429 | "GNS_PHASE_REC: Record resolved from DHT!"); | 1440 | "GNS_PHASE_REC-%d: Record resolved from DHT!", rh->id); |
1430 | 1441 | ||
1431 | finish_lookup(rh, rlh, rd_count, rd); | 1442 | finish_lookup(rh, rlh, rd_count, rd); |
1432 | free_resolver_handle(rh); | 1443 | free_resolver_handle(rh); |
@@ -1452,7 +1463,8 @@ handle_record_ns(void* cls, struct ResolverHandle *rh, | |||
1452 | if (rd_count == 0) | 1463 | if (rd_count == 0) |
1453 | { | 1464 | { |
1454 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1465 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1455 | "GNS_PHASE_REC: NS returned no records. (status: %d)!\n", | 1466 | "GNS_PHASE_REC-%d: NS returned no records. (status: %d)!\n", |
1467 | rh->id, | ||
1456 | rh->status); | 1468 | rh->status); |
1457 | 1469 | ||
1458 | /** | 1470 | /** |
@@ -1482,7 +1494,7 @@ handle_record_ns(void* cls, struct ResolverHandle *rh, | |||
1482 | 1494 | ||
1483 | /* results found yay */ | 1495 | /* results found yay */ |
1484 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1496 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1485 | "GNS_PHASE_REC: Record resolved from namestore!"); | 1497 | "GNS_PHASE_REC-%d: Record resolved from namestore!", rh->id); |
1486 | 1498 | ||
1487 | finish_lookup(rh, rlh, rd_count, rd); | 1499 | finish_lookup(rh, rlh, rd_count, rd); |
1488 | 1500 | ||
@@ -1568,7 +1580,7 @@ is_tld(const char* name, const char* tld) | |||
1568 | offset = strlen(name)-strlen(tld); | 1580 | offset = strlen(name)-strlen(tld); |
1569 | if (strcmp(name+offset, tld) != 0) | 1581 | if (strcmp(name+offset, tld) != 0) |
1570 | { | 1582 | { |
1571 | GNUNET_log(GNUNET_ERROR_TYPE_INFO, | 1583 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1572 | "%s is not in .%s TLD\n", name, tld); | 1584 | "%s is not in .%s TLD\n", name, tld); |
1573 | return GNUNET_NO; | 1585 | return GNUNET_NO; |
1574 | } | 1586 | } |
@@ -1597,14 +1609,16 @@ handle_delegation_dht(void* cls, struct ResolverHandle *rh, | |||
1597 | if ((rlh->record_type == GNUNET_GNS_RECORD_PKEY)) | 1609 | if ((rlh->record_type == GNUNET_GNS_RECORD_PKEY)) |
1598 | { | 1610 | { |
1599 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1611 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1600 | "GNS_PHASE_DELEGATE_DHT: Resolved queried PKEY via DHT.\n"); | 1612 | "GNS_PHASE_DELEGATE_DHT-%d: Resolved queried PKEY via DHT.\n", |
1613 | rh->id); | ||
1601 | finish_lookup(rh, rlh, rd_count, rd); | 1614 | finish_lookup(rh, rlh, rd_count, rd); |
1602 | free_resolver_handle(rh); | 1615 | free_resolver_handle(rh); |
1603 | return; | 1616 | return; |
1604 | } | 1617 | } |
1605 | /* We resolved full name for delegation. resolving record */ | 1618 | /* We resolved full name for delegation. resolving record */ |
1606 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1619 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1607 | "GNS_PHASE_DELEGATE_DHT: Resolved full name for delegation via DHT.\n"); | 1620 | "GNS_PHASE_DELEGATE_DHT-%d: Resolved full name for delegation via DHT.\n", |
1621 | rh->id); | ||
1608 | strcpy(rh->name, "+\0"); | 1622 | strcpy(rh->name, "+\0"); |
1609 | rh->proc = &handle_record_ns; | 1623 | rh->proc = &handle_record_ns; |
1610 | resolve_record_ns(rh); | 1624 | resolve_record_ns(rh); |
@@ -1617,16 +1631,17 @@ handle_delegation_dht(void* cls, struct ResolverHandle *rh, | |||
1617 | if (is_canonical(rh->name)) | 1631 | if (is_canonical(rh->name)) |
1618 | { | 1632 | { |
1619 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1633 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1620 | "GNS_PHASE_DELEGATE_DHT: Resolving canonical record %s in ns\n", | 1634 | "GNS_PHASE_DELEGATE_DHT-%d: Resolving canonical record %s in ns\n", |
1621 | rh->name); | 1635 | rh->id, |
1636 | rh->name); | ||
1622 | rh->proc = &handle_record_ns; | 1637 | rh->proc = &handle_record_ns; |
1623 | resolve_record_ns(rh); | 1638 | resolve_record_ns(rh); |
1624 | return; | 1639 | return; |
1625 | } | 1640 | } |
1626 | /* give up, cannot resolve */ | 1641 | /* give up, cannot resolve */ |
1627 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1642 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1628 | "GNS_PHASE_DELEGATE_DHT: Cannot fully resolve delegation for %s via DHT!\n", | 1643 | "GNS_PHASE_DELEGATE_DHT-%d: Cannot fully resolve delegation for %s via DHT!\n", |
1629 | rh->name); | 1644 | rh->id, rh->name); |
1630 | finish_lookup(rh, rlh, 0, NULL); | 1645 | finish_lookup(rh, rlh, 0, NULL); |
1631 | free_resolver_handle(rh); | 1646 | free_resolver_handle(rh); |
1632 | } | 1647 | } |
@@ -1677,8 +1692,8 @@ resolve_delegation_dht(struct ResolverHandle *rh) | |||
1677 | rh_heap_root->dht_heap_node = NULL; | 1692 | rh_heap_root->dht_heap_node = NULL; |
1678 | 1693 | ||
1679 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1694 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1680 | "GNS_PHASE_DELEGATE_DHT: Replacing oldest background query for %s\n", | 1695 | "GNS_PHASE_DELEGATE_DHT-%d: Replacing oldest background query for %s\n", |
1681 | rh_heap_root->authority_name); | 1696 | rh->id, rh_heap_root->authority_name); |
1682 | 1697 | ||
1683 | rh_heap_root->proc(rh_heap_root->proc_cls, | 1698 | rh_heap_root->proc(rh_heap_root->proc_cls, |
1684 | rh_heap_root, | 1699 | rh_heap_root, |
@@ -1729,14 +1744,16 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh, | |||
1729 | { | 1744 | { |
1730 | GNUNET_assert(rd_count == 1); | 1745 | GNUNET_assert(rd_count == 1); |
1731 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1746 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1732 | "GNS_PHASE_DELEGATE_NS: Resolved queried PKEY in NS.\n"); | 1747 | "GNS_PHASE_DELEGATE_NS-%d: Resolved queried PKEY in NS.\n", |
1748 | rh->id); | ||
1733 | finish_lookup(rh, rlh, rd_count, rd); | 1749 | finish_lookup(rh, rlh, rd_count, rd); |
1734 | free_resolver_handle(rh); | 1750 | free_resolver_handle(rh); |
1735 | return; | 1751 | return; |
1736 | } | 1752 | } |
1737 | /* We resolved full name for delegation. resolving record */ | 1753 | /* We resolved full name for delegation. resolving record */ |
1738 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1754 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1739 | "GNS_PHASE_DELEGATE_NS: Resolved full name for delegation.\n"); | 1755 | "GNS_PHASE_DELEGATE_NS-%d: Resolved full name for delegation.\n", |
1756 | rh->id); | ||
1740 | strcpy(rh->name, "+\0"); | 1757 | strcpy(rh->name, "+\0"); |
1741 | rh->proc = &handle_record_ns; | 1758 | rh->proc = &handle_record_ns; |
1742 | resolve_record_ns(rh); | 1759 | resolve_record_ns(rh); |
@@ -1756,7 +1773,8 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh, | |||
1756 | if (is_canonical(rh->name)) | 1773 | if (is_canonical(rh->name)) |
1757 | { | 1774 | { |
1758 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1775 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1759 | "GNS_PHASE_DELEGATE_NS: Resolving canonical record %s\n", | 1776 | "GNS_PHASE_DELEGATE_NS-%d: Resolving canonical record %s\n", |
1777 | rh->id, | ||
1760 | rh->name); | 1778 | rh->name); |
1761 | rh->proc = &handle_record_ns; | 1779 | rh->proc = &handle_record_ns; |
1762 | resolve_record_ns(rh); | 1780 | resolve_record_ns(rh); |
@@ -1765,8 +1783,9 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh, | |||
1765 | { | 1783 | { |
1766 | /* give up, cannot resolve */ | 1784 | /* give up, cannot resolve */ |
1767 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1785 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1768 | "GNS_PHASE_DELEGATE_NS: Cannot fully resolve delegation for %s!\n", | 1786 | "GNS_PHASE_DELEGATE_NS-%d: Cannot fully resolve delegation for %s!\n", |
1769 | rh->name); | 1787 | rh->id, |
1788 | rh->name); | ||
1770 | finish_lookup(rh, rlh, rd_count, rd); | 1789 | finish_lookup(rh, rlh, rd_count, rd); |
1771 | //rlh->proc(rlh->proc_cls, 0, NULL); | 1790 | //rlh->proc(rlh->proc_cls, 0, NULL); |
1772 | } | 1791 | } |
@@ -1774,8 +1793,8 @@ handle_delegation_ns(void* cls, struct ResolverHandle *rh, | |||
1774 | } | 1793 | } |
1775 | 1794 | ||
1776 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1795 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1777 | "GNS_PHASE_DELEGATE_NS: Trying to resolve delegation for %s via DHT\n", | 1796 | "GNS_PHASE_DELEGATE_NS-%d: Trying to resolve delegation for %s via DHT\n", |
1778 | rh->name); | 1797 | rh->id, rh->name); |
1779 | rh->proc = &handle_delegation_dht; | 1798 | rh->proc = &handle_delegation_dht; |
1780 | resolve_delegation_dht(rh); | 1799 | resolve_delegation_dht(rh); |
1781 | } | 1800 | } |
@@ -1809,12 +1828,12 @@ process_delegation_result_ns(void* cls, | |||
1809 | struct GNUNET_TIME_Relative remaining_time; | 1828 | struct GNUNET_TIME_Relative remaining_time; |
1810 | struct GNUNET_CRYPTO_ShortHashCode zone; | 1829 | struct GNUNET_CRYPTO_ShortHashCode zone; |
1811 | char new_name[MAX_DNS_NAME_LENGTH]; | 1830 | char new_name[MAX_DNS_NAME_LENGTH]; |
1812 | 1831 | ||
1832 | rh = (struct ResolverHandle *)cls; | ||
1813 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1833 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1814 | "GNS_PHASE_DELEGATE_NS: Got %d records from authority lookup\n", | 1834 | "GNS_PHASE_DELEGATE_NS-%d: Got %d records from authority lookup\n", |
1815 | rd_count); | 1835 | rh->id, rd_count); |
1816 | 1836 | ||
1817 | rh = (struct ResolverHandle *)cls; | ||
1818 | GNUNET_CRYPTO_short_hash(key, | 1837 | GNUNET_CRYPTO_short_hash(key, |
1819 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), | 1838 | sizeof(struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded), |
1820 | &zone); | 1839 | &zone); |
@@ -1850,16 +1869,16 @@ process_delegation_result_ns(void* cls, | |||
1850 | { | 1869 | { |
1851 | /* simply promote back */ | 1870 | /* simply promote back */ |
1852 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1871 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1853 | "GNS_PHASE_DELEGATE_NS: Promoting %s back to name\n", | 1872 | "GNS_PHASE_DELEGATE_NS-%d: Promoting %s back to name\n", |
1854 | rh->authority_name); | 1873 | rh->id, rh->authority_name); |
1855 | strcpy(rh->name, rh->authority_name); | 1874 | strcpy(rh->name, rh->authority_name); |
1856 | } | 1875 | } |
1857 | else | 1876 | else |
1858 | { | 1877 | { |
1859 | /* add back to existing name */ | 1878 | /* add back to existing name */ |
1860 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1879 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1861 | "GNS_PHASE_DELEGATE_NS: Adding %s back to %s\n", | 1880 | "GNS_PHASE_DELEGATE_NS-%d: Adding %s back to %s\n", |
1862 | rh->authority_name, rh->name); | 1881 | rh->id, rh->authority_name, rh->name); |
1863 | //memset(new_name, 0, strlen(rh->name) + strlen(rh->authority_name) + 2); | 1882 | //memset(new_name, 0, strlen(rh->name) + strlen(rh->authority_name) + 2); |
1864 | GNUNET_snprintf(new_name, MAX_DNS_NAME_LENGTH, "%s.%s", | 1883 | GNUNET_snprintf(new_name, MAX_DNS_NAME_LENGTH, "%s.%s", |
1865 | rh->name, rh->authority_name); | 1884 | rh->name, rh->authority_name); |
@@ -1868,7 +1887,7 @@ process_delegation_result_ns(void* cls, | |||
1868 | //strcpy(new_name+strlen(new_name), rh->authority_name); | 1887 | //strcpy(new_name+strlen(new_name), rh->authority_name); |
1869 | strcpy(rh->name, new_name); | 1888 | strcpy(rh->name, new_name); |
1870 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1889 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1871 | "GNS_PHASE_DELEGATE_NS: %s restored\n", rh->name); | 1890 | "GNS_PHASE_DELEGATE_NS-%d: %s restored\n", rh->id, rh->name); |
1872 | } | 1891 | } |
1873 | rh->proc(rh->proc_cls, rh, 0, NULL); | 1892 | rh->proc(rh->proc_cls, rh, 0, NULL); |
1874 | return; | 1893 | return; |
@@ -1890,11 +1909,13 @@ process_delegation_result_ns(void* cls, | |||
1890 | == 0) | 1909 | == 0) |
1891 | { | 1910 | { |
1892 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1911 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1893 | "GNS_PHASE_DELEGATE_NS: This pkey is expired.\n"); | 1912 | "GNS_PHASE_DELEGATE_NS-%d: This pkey is expired.\n", |
1913 | rh->id); | ||
1894 | if (remaining_time.rel_value == 0) | 1914 | if (remaining_time.rel_value == 0) |
1895 | { | 1915 | { |
1896 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1916 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1897 | "GNS_PHASE_DELEGATE_NS: This dht entry is expired.\n"); | 1917 | "GNS_PHASE_DELEGATE_NS-%d: This dht entry is expired.\n", |
1918 | rh->id); | ||
1898 | rh->authority_chain_head->fresh = 0; | 1919 | rh->authority_chain_head->fresh = 0; |
1899 | rh->proc(rh->proc_cls, rh, 0, NULL); | 1920 | rh->proc(rh->proc_cls, rh, 0, NULL); |
1900 | return; | 1921 | return; |
@@ -1937,7 +1958,7 @@ process_delegation_result_ns(void* cls, | |||
1937 | * no answers found | 1958 | * no answers found |
1938 | */ | 1959 | */ |
1939 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1960 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1940 | "GNS_PHASE_DELEGATE_NS: Authority lookup and no PKEY...\n"); | 1961 | "GNS_PHASE_DELEGATE_NS-%d: Authority lookup and no PKEY...\n", rh->id); |
1941 | rh->proc(rh->proc_cls, rh, 0, NULL); | 1962 | rh->proc(rh->proc_cls, rh, 0, NULL); |
1942 | } | 1963 | } |
1943 | 1964 | ||
@@ -1951,7 +1972,8 @@ static void | |||
1951 | resolve_delegation_ns(struct ResolverHandle *rh) | 1972 | resolve_delegation_ns(struct ResolverHandle *rh) |
1952 | { | 1973 | { |
1953 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | 1974 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, |
1954 | "GNS_PHASE_DELEGATE_NS: Resolving delegation for %s\n", rh->name); | 1975 | "GNS_PHASE_DELEGATE_NS-%d: Resolving delegation for %s\n", |
1976 | rh->id, rh->name); | ||
1955 | pop_tld(rh->name, rh->authority_name); | 1977 | pop_tld(rh->name, rh->authority_name); |
1956 | GNUNET_NAMESTORE_lookup_record(namestore_handle, | 1978 | GNUNET_NAMESTORE_lookup_record(namestore_handle, |
1957 | &rh->authority, | 1979 | &rh->authority, |
@@ -2007,6 +2029,7 @@ gns_resolver_lookup_record(struct GNUNET_CRYPTO_ShortHashCode zone, | |||
2007 | rh = GNUNET_malloc(sizeof (struct ResolverHandle)); | 2029 | rh = GNUNET_malloc(sizeof (struct ResolverHandle)); |
2008 | 2030 | ||
2009 | rh->authority = zone; | 2031 | rh->authority = zone; |
2032 | rh->id = rid++; | ||
2010 | rh->proc_cls = rlh; | 2033 | rh->proc_cls = rlh; |
2011 | rh->priv_key = key; | 2034 | rh->priv_key = key; |
2012 | rh->timeout = timeout; | 2035 | rh->timeout = timeout; |
@@ -2016,6 +2039,8 @@ gns_resolver_lookup_record(struct GNUNET_CRYPTO_ShortHashCode zone, | |||
2016 | /* | 2039 | /* |
2017 | * Set timeout for authority lookup phase to 1/2 | 2040 | * Set timeout for authority lookup phase to 1/2 |
2018 | */ | 2041 | */ |
2042 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2043 | "Timeout for lookup set to %ds\n", rh->timeout.rel_value); | ||
2019 | rh->timeout_task = GNUNET_SCHEDULER_add_delayed( | 2044 | rh->timeout_task = GNUNET_SCHEDULER_add_delayed( |
2020 | GNUNET_TIME_relative_divide(timeout, 2), | 2045 | GNUNET_TIME_relative_divide(timeout, 2), |
2021 | &handle_lookup_timeout, | 2046 | &handle_lookup_timeout, |
@@ -2299,6 +2324,7 @@ handle_delegation_ns_shorten(void* cls, | |||
2299 | { | 2324 | { |
2300 | rh_bg = GNUNET_malloc(sizeof(struct ResolverHandle)); | 2325 | rh_bg = GNUNET_malloc(sizeof(struct ResolverHandle)); |
2301 | memcpy(rh_bg, rh, sizeof(struct ResolverHandle)); | 2326 | memcpy(rh_bg, rh, sizeof(struct ResolverHandle)); |
2327 | rh_bg->id = rid++; | ||
2302 | } | 2328 | } |
2303 | 2329 | ||
2304 | /* backtrack authorities for names */ | 2330 | /* backtrack authorities for names */ |
@@ -2448,9 +2474,11 @@ gns_resolver_shorten_name(struct GNUNET_CRYPTO_ShortHashCode zone, | |||
2448 | 2474 | ||
2449 | rh = GNUNET_malloc(sizeof (struct ResolverHandle)); | 2475 | rh = GNUNET_malloc(sizeof (struct ResolverHandle)); |
2450 | rh->authority = zone; | 2476 | rh->authority = zone; |
2477 | rh->id = rid++; | ||
2451 | rh->priv_key = key; | 2478 | rh->priv_key = key; |
2452 | rh->proc = &handle_delegation_ns_shorten; | 2479 | rh->proc = &handle_delegation_ns_shorten; |
2453 | rh->proc_cls = nsh; | 2480 | rh->proc_cls = nsh; |
2481 | rh->id = rid++; | ||
2454 | 2482 | ||
2455 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2483 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2456 | "Checking for TLD...\n"); | 2484 | "Checking for TLD...\n"); |
@@ -2615,6 +2643,7 @@ gns_resolver_get_authority(struct GNUNET_CRYPTO_ShortHashCode zone, | |||
2615 | nah = GNUNET_malloc(sizeof (struct GetNameAuthorityHandle)); | 2643 | nah = GNUNET_malloc(sizeof (struct GetNameAuthorityHandle)); |
2616 | rh = GNUNET_malloc(sizeof (struct ResolverHandle)); | 2644 | rh = GNUNET_malloc(sizeof (struct ResolverHandle)); |
2617 | rh->authority = zone; | 2645 | rh->authority = zone; |
2646 | rh->id = rid++; | ||
2618 | 2647 | ||
2619 | if (strcmp(GNUNET_GNS_TLD, name) == 0) | 2648 | if (strcmp(GNUNET_GNS_TLD, name) == 0) |
2620 | { | 2649 | { |