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
Automate
Agent sessions
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
237859d8
Unverified
Commit
237859d8
authored
Dec 20, 2017
by
Adrien Béraud
Committed by
GitHub
Dec 20, 2017
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into push_notifications_client
parents
37a9a3d9
24dec068
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_interface.h
+4
-2
4 additions, 2 deletions
include/opendht/dht_interface.h
include/opendht/securedht.h
+16
-0
16 additions, 0 deletions
include/opendht/securedht.h
with
20 additions
and
2 deletions
include/opendht/dht_interface.h
+
4
−
2
View file @
237859d8
...
@@ -214,7 +214,6 @@ public:
...
@@ -214,7 +214,6 @@ public:
virtual
std
::
vector
<
SockAddr
>
getPublicAddress
(
sa_family_t
family
=
0
)
=
0
;
virtual
std
::
vector
<
SockAddr
>
getPublicAddress
(
sa_family_t
family
=
0
)
=
0
;
Logger
DHT_LOG
;
/**
/**
* Enable or disable logging of DHT internal messages
* Enable or disable logging of DHT internal messages
*/
*/
...
@@ -228,7 +227,8 @@ public:
...
@@ -228,7 +227,8 @@ public:
/**
/**
* Only print logs related to the given InfoHash (if given), or disable filter (if zeroes).
* Only print logs related to the given InfoHash (if given), or disable filter (if zeroes).
*/
*/
virtual
void
setLogFilter
(
const
InfoHash
&
f
)
{
virtual
void
setLogFilter
(
const
InfoHash
&
f
)
{
DHT_LOG
.
setFilter
(
f
);
DHT_LOG
.
setFilter
(
f
);
}
}
...
@@ -244,9 +244,11 @@ public:
...
@@ -244,9 +244,11 @@ public:
*/
*/
virtual
void
resubscribe
(
const
unsigned
token
)
=
0
;
virtual
void
resubscribe
(
const
unsigned
token
)
=
0
;
#endif // OPENDHT_PUSH_NOTIFICATIONS
#endif // OPENDHT_PUSH_NOTIFICATIONS
protected
:
protected
:
bool
logFilerEnable_
{};
bool
logFilerEnable_
{};
InfoHash
logFiler_
{};
InfoHash
logFiler_
{};
Logger
DHT_LOG
;
};
};
}
// namespace dht
}
// namespace dht
This diff is collapsed.
Click to expand it.
include/opendht/securedht.h
+
16
−
0
View file @
237859d8
...
@@ -322,6 +322,22 @@ public:
...
@@ -322,6 +322,22 @@ public:
}
}
#endif // OPENDHT_PUSH_NOTIFICATIONS
#endif // OPENDHT_PUSH_NOTIFICATIONS
void
setLoggers
(
LogMethod
error
=
NOLOG
,
LogMethod
warn
=
NOLOG
,
LogMethod
debug
=
NOLOG
)
{
DHT_LOG
.
DEBUG
=
debug
;
DHT_LOG
.
WARN
=
warn
;
DHT_LOG
.
ERR
=
error
;
dht_
->
setLoggers
(
std
::
forward
<
LogMethod
>
(
error
),
std
::
forward
<
LogMethod
>
(
warn
),
std
::
forward
<
LogMethod
>
(
debug
));
}
/**
* Only print logs related to the given InfoHash (if given), or disable filter (if zeroes).
*/
void
setLogFilter
(
const
InfoHash
&
f
)
{
DHT_LOG
.
setFilter
(
f
);
dht_
->
setLogFilter
(
f
);
}
private
:
private
:
std
::
unique_ptr
<
DhtInterface
>
dht_
;
std
::
unique_ptr
<
DhtInterface
>
dht_
;
// prevent copy
// prevent copy
...
...
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
sign in
to comment