From 66ff021938fef39ec0c162ed2f70a96e4ea204cf Mon Sep 17 00:00:00 2001 From: orignal Date: Thu, 13 Mar 2014 16:26:04 -0400 Subject: [PATCH] find address --- NetDb.cpp | 7 ------- NetDb.h | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/NetDb.cpp b/NetDb.cpp index 1b115c63..951f9623 100644 --- a/NetDb.cpp +++ b/NetDb.cpp @@ -318,13 +318,6 @@ namespace data LogPrint (deletedCount," routers deleted"); } - void NetDb::RequestDestination (const char * b32) - { - uint8_t destination[32]; - Base32ToByteStream (b32, strlen(b32), destination, 32); - RequestDestination (destination, true); - } - void NetDb::RequestDestination (const IdentHash& destination, bool isLeaseSet) { if (isLeaseSet) // we request LeaseSet through tunnels diff --git a/NetDb.h b/NetDb.h index 96188513..f9cf3900 100644 --- a/NetDb.h +++ b/NetDb.h @@ -64,10 +64,10 @@ namespace data void AddLeaseSet (uint8_t * buf, int len); RouterInfo * FindRouter (const IdentHash& ident) const; LeaseSet * FindLeaseSet (const IdentHash& destination) const; + const IdentHash * FindAddress (const std::string& address) { return m_AddressBook.FindAddress (address); }; // TODO: move AddressBook away from NetDb + void Subscribe (const IdentHash& ident); // keep LeaseSets upto date void Unsubscribe (const IdentHash& ident); - - void RequestDestination (const char * b32); // in base32 void RequestDestination (const IdentHash& destination, bool isLeaseSet = false); void HandleDatabaseStoreMsg (uint8_t * buf, size_t len);