Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
40cae3db
Commit
40cae3db
authored
May 01, 2019
by
Adrien Béraud
Browse files
namedirectory: use dht executor
Change-Id: I232a001d3e62b7470e38adc1aa74eabadcc8b210
parent
827c546d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
src/jamidht/namedirectory.cpp
View file @
40cae3db
This diff is collapsed.
Click to expand it.
src/jamidht/namedirectory.h
View file @
40cae3db
...
...
@@ -23,8 +23,10 @@
#include
<map>
#include
<string>
#include
<mutex>
#include
<memory>
namespace
dht
{
class
Executor
;
namespace
crypto
{
struct
PublicKey
;
}
...
...
@@ -78,6 +80,8 @@ private:
std
::
map
<
std
::
string
,
std
::
string
>
nameCache_
{};
std
::
map
<
std
::
string
,
std
::
string
>
addrCache_
{};
std
::
shared_ptr
<
dht
::
Executor
>
executor_
;
std
::
string
nameCache
(
const
std
::
string
&
addr
)
{
std
::
lock_guard
<
std
::
mutex
>
l
(
lock_
);
auto
cacheRes
=
nameCache_
.
find
(
addr
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment