diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-03-02 11:07:42 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2012-03-02 11:07:42 +0000 |
commit | a9a895d090282d08c58460f20cab807337e82109 (patch) | |
tree | 6c65d07027321dc3e0899f8b08cffb62a5da4c05 /src/gns/gnunet-service-gns.c | |
parent | e892ec3a25fc315d58ae7aafbd138b79aff2ca34 (diff) | |
download | gnunet-a9a895d090282d08c58460f20cab807337e82109.tar.gz gnunet-a9a895d090282d08c58460f20cab807337e82109.zip |
-fixes
Diffstat (limited to 'src/gns/gnunet-service-gns.c')
-rw-r--r-- | src/gns/gnunet-service-gns.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 30ce31cad..2a31e5e61 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c | |||
@@ -161,7 +161,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
161 | GNUNET_SCHEDULER_cancel(zone_update_taskid); | 161 | GNUNET_SCHEDULER_cancel(zone_update_taskid); |
162 | 162 | ||
163 | GNUNET_DNS_disconnect(dns_handle); | 163 | GNUNET_DNS_disconnect(dns_handle); |
164 | GNUNET_NAMESTORE_disconnect(namestore_handle, 0); | 164 | GNUNET_NAMESTORE_disconnect(namestore_handle, 1); |
165 | GNUNET_DHT_disconnect(dht_handle); | 165 | GNUNET_DHT_disconnect(dht_handle); |
166 | } | 166 | } |
167 | 167 | ||
@@ -558,6 +558,9 @@ process_authority_lookup(void* cls, | |||
558 | struct GNUNET_GNS_ResolverHandle *rh; | 558 | struct GNUNET_GNS_ResolverHandle *rh; |
559 | struct GNUNET_TIME_Relative remaining_time; | 559 | struct GNUNET_TIME_Relative remaining_time; |
560 | GNUNET_HashCode zone; | 560 | GNUNET_HashCode zone; |
561 | |||
562 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Got %d records from authority lookup\n", | ||
563 | rd_count); | ||
561 | 564 | ||
562 | rh = (struct GNUNET_GNS_ResolverHandle *)cls; | 565 | rh = (struct GNUNET_GNS_ResolverHandle *)cls; |
563 | GNUNET_CRYPTO_hash(key, | 566 | GNUNET_CRYPTO_hash(key, |
@@ -575,9 +578,12 @@ process_authority_lookup(void* cls, | |||
575 | * _IF_ the current authoritative zone is us we cannot resolve | 578 | * _IF_ the current authoritative zone is us we cannot resolve |
576 | * _ELSE_ we can still check the _expired_ dht | 579 | * _ELSE_ we can still check the _expired_ dht |
577 | */ | 580 | */ |
578 | if (0 != GNUNET_CRYPTO_hash_cmp(&zone, &zone_hash) && | 581 | if ((0 != GNUNET_CRYPTO_hash_cmp(&rh->authority, &zone_hash)) && |
579 | (remaining_time.rel_value == 0)) | 582 | (remaining_time.rel_value == 0)) |
580 | { | 583 | { |
584 | GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, | ||
585 | "Authority %s unknown in namestore, trying dht\n", | ||
586 | rh->authority_name); | ||
581 | resolve_authority_dht(rh); | 587 | resolve_authority_dht(rh); |
582 | return; | 588 | return; |
583 | } | 589 | } |
@@ -950,8 +956,9 @@ start_resolution(struct GNUNET_DNS_RequestHandle *request, | |||
950 | { | 956 | { |
951 | struct GNUNET_GNS_ResolverHandle *rh; | 957 | struct GNUNET_GNS_ResolverHandle *rh; |
952 | 958 | ||
953 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting resolution for (%s)!\n", | 959 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
954 | q->name); | 960 | "Starting resolution for %s (type=%d)!\n", |
961 | q->name, q->type); | ||
955 | 962 | ||
956 | rh = GNUNET_malloc(sizeof (struct GNUNET_GNS_ResolverHandle)); | 963 | rh = GNUNET_malloc(sizeof (struct GNUNET_GNS_ResolverHandle)); |
957 | rh->packet = p; | 964 | rh->packet = p; |
@@ -1410,7 +1417,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
1410 | */ | 1417 | */ |
1411 | dht_update_interval = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, | 1418 | dht_update_interval = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, |
1412 | 1); | 1419 | 1); |
1413 | zone_update_taskid = GNUNET_SCHEDULER_add_now (&update_zone_dht_start, NULL); | 1420 | //zone_update_taskid = GNUNET_SCHEDULER_add_now (&update_zone_dht_start, NULL); |
1414 | 1421 | ||
1415 | } | 1422 | } |
1416 | 1423 | ||