Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dhtnet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
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
dhtnet
Commits
753c8197
Commit
753c8197
authored
1 year ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
upnp: set context in ConnectionManager
Change-Id: I2fe4f7e2c48edb99154d07619a79dae3bff6b091
parent
3bd61c98
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/upnp/upnp_control.h
+1
-1
1 addition, 1 deletion
include/upnp/upnp_control.h
src/connectionmanager.cpp
+1
-0
1 addition, 0 deletions
src/connectionmanager.cpp
src/ice_transport.cpp
+1
-1
1 addition, 1 deletion
src/ice_transport.cpp
with
3 additions
and
2 deletions
include/upnp/upnp_control.h
+
1
−
1
View file @
753c8197
...
@@ -31,7 +31,7 @@ namespace upnp {
...
@@ -31,7 +31,7 @@ namespace upnp {
class
UPnPContext
;
class
UPnPContext
;
class
Controller
class
Controller
:
std
::
enable_shared_from_this
<
Controller
>
{
{
public:
public:
Controller
(
const
std
::
shared_ptr
<
UPnPContext
>&
ctx
);
Controller
(
const
std
::
shared_ptr
<
UPnPContext
>&
ctx
);
...
...
This diff is collapsed.
Click to expand it.
src/connectionmanager.cpp
+
1
−
0
View file @
753c8197
...
@@ -1473,6 +1473,7 @@ ConnectionManager::Impl::getIceOptions() const noexcept
...
@@ -1473,6 +1473,7 @@ ConnectionManager::Impl::getIceOptions() const noexcept
IceTransportOptions
opts
;
IceTransportOptions
opts
;
opts
.
factory
=
config_
->
factory
;
opts
.
factory
=
config_
->
factory
;
opts
.
upnpEnable
=
getUPnPActive
();
opts
.
upnpEnable
=
getUPnPActive
();
opts
.
upnpContext
=
config_
->
upnpCtrl
;
if
(
config_
->
stunEnabled
)
if
(
config_
->
stunEnabled
)
opts
.
stunServers
.
emplace_back
(
StunServerInfo
().
setUri
(
config_
->
stunServer
));
opts
.
stunServers
.
emplace_back
(
StunServerInfo
().
setUri
(
config_
->
stunServer
));
...
...
This diff is collapsed.
Click to expand it.
src/ice_transport.cpp
+
1
−
1
View file @
753c8197
...
@@ -415,7 +415,7 @@ IceTransport::Impl::initIceInstance(const IceTransportOptions& options)
...
@@ -415,7 +415,7 @@ IceTransport::Impl::initIceInstance(const IceTransportOptions& options)
initiatorSession_
?
"master"
:
"slave"
);
initiatorSession_
?
"master"
:
"slave"
);
if
(
upnpEnabled_
)
if
(
upnpEnabled_
)
upnp_
.
reset
(
new
upnp
::
Controller
(
options
.
upnpContext
)
)
;
upnp_
=
std
::
make_shared
<
upnp
::
Controller
>
(
options
.
upnpContext
);
config_
=
options
.
factory
->
getIceCfg
();
// config copy
config_
=
options
.
factory
->
getIceCfg
();
// config copy
if
(
isTcp_
)
{
if
(
isTcp_
)
{
...
...
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