From: Martin Schanzenbach Date: Wed, 28 Mar 2012 09:32:20 +0000 (+0000) Subject: -add record type any, pending flag X-Git-Tag: initial-import-from-subversion-38251~14070 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c6207ae14cf9ff6a428f1c6d962eb5f8a6b9f6a8;p=oweals%2Fgnunet.git -add record type any, pending flag --- diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index d1cc4ccd3..7d3a518b5 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c @@ -69,6 +69,11 @@ static unsigned long long max_allowed_background_queries; */ static struct GNUNET_CRYPTO_ShortHashCode local_zone; +/** + * a resolution identifier pool variable + * FIXME overflow? + * This is a non critical identifier useful for debugging + */ static unsigned long long rid = 0; /** @@ -164,7 +169,7 @@ process_pseu_result(struct GetPseuAuthorityHandle* gph, char* name) GNUNET_NAMESTORE_lookup_record(namestore_handle, &gph->zone, gph->new_name, - GNUNET_GNS_RECORD_PSEU, + GNUNET_NAMESTORE_TYPE_ANY, &process_pseu_lookup_ns, gph); } @@ -1904,6 +1909,15 @@ process_delegation_result_ns(void* cls, if (rd[i].record_type != GNUNET_GNS_RECORD_PKEY) continue; + + if (rd[i].flags & GNUNET_NAMESTORE_RF_PENDING) + { + GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, + "GNS_PHASE_DELEGATE_NS-%llu: PKEY for %s is pending user confirmation.\n", + name, + rh->id); + continue; + } if ((GNUNET_TIME_absolute_get_remaining (rd[i].expiration)).rel_value == 0) diff --git a/src/gns/testdb/sqlite-alice.db b/src/gns/testdb/sqlite-alice.db index 3a428a881..efc27b9a3 100644 Binary files a/src/gns/testdb/sqlite-alice.db and b/src/gns/testdb/sqlite-alice.db differ diff --git a/src/gns/testdb/sqlite-bob.db b/src/gns/testdb/sqlite-bob.db index 14749db37..884d58035 100644 Binary files a/src/gns/testdb/sqlite-bob.db and b/src/gns/testdb/sqlite-bob.db differ diff --git a/src/gns/testdb/sqlite-dave.db b/src/gns/testdb/sqlite-dave.db index 10b9d82c6..c071b5d08 100644 Binary files a/src/gns/testdb/sqlite-dave.db and b/src/gns/testdb/sqlite-dave.db differ diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index e66062772..232702592 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h @@ -43,6 +43,10 @@ extern "C" #endif #endif +/** + * Record type indicating any record/'*' + */ +#define GNUNET_NAMESTORE_TYPE_ANY 0 /** * Record type for GNS zone transfer ("PKEY"). @@ -139,7 +143,13 @@ enum GNUNET_NAMESTORE_RecordFlags * This is a private record of this peer and it should * thus not be handed out to other peers. */ - GNUNET_NAMESTORE_RF_PRIVATE = 2 + GNUNET_NAMESTORE_RF_PRIVATE = 2, + + /** + * This record was added by the system + * and is pending user confimation + */ + GNUNET_NAMESTORE_RF_PENDING = 4 };