Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
d8aa94c8
Commit
d8aa94c8
authored
Jul 17, 2019
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
proxy: cleanup
parent
8a88ca94
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/opendht/dht_proxy_client.h
+0
-1
0 additions, 1 deletion
include/opendht/dht_proxy_client.h
src/dht_proxy_client.cpp
+3
-4
3 additions, 4 deletions
src/dht_proxy_client.cpp
with
3 additions
and
5 deletions
include/opendht/dht_proxy_client.h
+
0
−
1
View file @
d8aa94c8
...
...
@@ -360,7 +360,6 @@ private:
/**
* Store listen requests.
*/
struct
Listener
;
struct
ProxySearch
;
size_t
listenerToken_
{
0
};
...
...
This diff is collapsed.
Click to expand it.
src/dht_proxy_client.cpp
+
3
−
4
View file @
d8aa94c8
...
...
@@ -297,7 +297,7 @@ DhtProxyClient::get(const InfoHash& key, GetCallback cb, DoneCallback donecb,
if
(
logger_
)
context
->
logger
=
logger_
;
std
::
weak_ptr
<
GetContext
>
wcontext
=
context
;
context
->
cb
=
[
this
,
key
,
wcontext
,
cb
](
const
dht
::
Sp
<
dht
::
Value
>
value
)
->
bool
{
context
->
cb
=
[
this
,
wcontext
,
cb
](
const
dht
::
Sp
<
dht
::
Value
>
value
)
->
bool
{
auto
context
=
wcontext
.
lock
();
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
lockCallbacks_
);
...
...
@@ -310,7 +310,7 @@ DhtProxyClient::get(const InfoHash& key, GetCallback cb, DoneCallback donecb,
loopSignal_
();
return
context
->
ok
;
};
context
->
donecb
=
[
this
,
key
,
donecb
](
bool
ok
){
context
->
donecb
=
[
this
,
donecb
](
bool
ok
){
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
lockCallbacks_
);
callbacks_
.
emplace_back
([
=
](){
...
...
@@ -663,8 +663,7 @@ DhtProxyClient::handleProxyStatus(const asio::error_code& ec, std::shared_ptr<In
if
(
logger_
)
context
->
logger
=
logger_
;
std
::
weak_ptr
<
StatusContext
>
wcontext
=
context
;
context
->
cb
=
[
this
,
wcontext
](
Json
::
Value
infos
)
{
context
->
cb
=
[
wcontext
](
Json
::
Value
infos
)
{
auto
context
=
wcontext
.
lock
();
if
(
context
->
family
==
AF_INET
)
context
->
infoState
->
ipv4
++
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment