Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
375cde8a
Commit
375cde8a
authored
Oct 01, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Avoid leaking UPnP mappings between streams
Clean up the UPnP mappings of each stream when closing it
parent
838c5cb5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
4 deletions
+33
-4
agent/agent-priv.h
agent/agent-priv.h
+3
-0
agent/agent.c
agent/agent.c
+21
-0
agent/component.c
agent/component.c
+8
-3
configure.ac
configure.ac
+1
-1
No files found.
agent/agent-priv.h
View file @
375cde8a
...
@@ -213,6 +213,9 @@ StunUsageIceCompatibility agent_to_ice_compatibility (NiceAgent *agent);
...
@@ -213,6 +213,9 @@ StunUsageIceCompatibility agent_to_ice_compatibility (NiceAgent *agent);
StunUsageTurnCompatibility
agent_to_turn_compatibility
(
NiceAgent
*
agent
);
StunUsageTurnCompatibility
agent_to_turn_compatibility
(
NiceAgent
*
agent
);
NiceTurnSocketCompatibility
agent_to_turn_socket_compatibility
(
NiceAgent
*
agent
);
NiceTurnSocketCompatibility
agent_to_turn_socket_compatibility
(
NiceAgent
*
agent
);
void
agent_remove_local_candidate
(
NiceAgent
*
agent
,
NiceCandidate
*
candidate
);
void
nice_agent_init_stun_agent
(
NiceAgent
*
agent
,
StunAgent
*
stun_agent
);
void
nice_agent_init_stun_agent
(
NiceAgent
*
agent
,
StunAgent
*
stun_agent
);
void
_priv_set_socket_tos
(
NiceAgent
*
agent
,
NiceSocket
*
sock
,
gint
tos
);
void
_priv_set_socket_tos
(
NiceAgent
*
agent
,
NiceSocket
*
sock
,
gint
tos
);
...
...
agent/agent.c
View file @
375cde8a
...
@@ -2850,6 +2850,9 @@ nice_agent_gather_candidates (
...
@@ -2850,6 +2850,9 @@ nice_agent_gather_candidates (
for
(
i
=
component
->
local_candidates
;
i
;
i
=
i
->
next
)
{
for
(
i
=
component
->
local_candidates
;
i
;
i
=
i
->
next
)
{
NiceCandidate
*
candidate
=
i
->
data
;
NiceCandidate
*
candidate
=
i
->
data
;
agent_remove_local_candidate
(
agent
,
candidate
);
nice_candidate_free
(
candidate
);
nice_candidate_free
(
candidate
);
}
}
g_slist_free
(
component
->
local_candidates
);
g_slist_free
(
component
->
local_candidates
);
...
@@ -2863,6 +2866,24 @@ nice_agent_gather_candidates (
...
@@ -2863,6 +2866,24 @@ nice_agent_gather_candidates (
return
ret
;
return
ret
;
}
}
void
agent_remove_local_candidate
(
NiceAgent
*
agent
,
NiceCandidate
*
candidate
)
{
#ifdef HAVE_GUPNP
gchar
local_ip
[
NICE_ADDRESS_STRING_LEN
];
if
(
agent
->
upnp
==
NULL
)
return
;
if
(
candidate
->
type
!=
NICE_CANDIDATE_TYPE_HOST
)
return
;
nice_address_to_string
(
&
candidate
->
addr
,
local_ip
);
gupnp_simple_igd_remove_port_local
(
GUPNP_SIMPLE_IGD
(
agent
->
upnp
),
"UDP"
,
local_ip
,
nice_address_get_port
(
&
candidate
->
addr
));
#endif
}
static
void
priv_stop_upnp
(
NiceAgent
*
agent
)
static
void
priv_stop_upnp
(
NiceAgent
*
agent
)
{
{
#ifdef HAVE_GUPNP
#ifdef HAVE_GUPNP
...
...
agent/component.c
View file @
375cde8a
...
@@ -200,6 +200,7 @@ component_clean_turn_servers (Component *cmp)
...
@@ -200,6 +200,7 @@ component_clean_turn_servers (Component *cmp)
conn_check_prune_socket
(
cmp
->
agent
,
cmp
->
stream
,
cmp
,
conn_check_prune_socket
(
cmp
->
agent
,
cmp
->
stream
,
cmp
,
candidate
->
sockptr
);
candidate
->
sockptr
);
component_detach_socket
(
cmp
,
candidate
->
sockptr
);
component_detach_socket
(
cmp
,
candidate
->
sockptr
);
agent_remove_local_candidate
(
cmp
->
agent
,
candidate
);
nice_candidate_free
(
candidate
);
nice_candidate_free
(
candidate
);
}
}
cmp
->
local_candidates
=
g_slist_delete_link
(
cmp
->
local_candidates
,
i
);
cmp
->
local_candidates
=
g_slist_delete_link
(
cmp
->
local_candidates
,
i
);
...
@@ -235,9 +236,13 @@ component_close (Component *cmp)
...
@@ -235,9 +236,13 @@ component_close (Component *cmp)
nice_candidate_free
(
cmp
->
turn_candidate
),
nice_candidate_free
(
cmp
->
turn_candidate
),
cmp
->
turn_candidate
=
NULL
;
cmp
->
turn_candidate
=
NULL
;
g_slist_free_full
(
cmp
->
local_candidates
,
while
(
cmp
->
local_candidates
)
{
(
GDestroyNotify
)
nice_candidate_free
);
agent_remove_local_candidate
(
cmp
->
agent
,
cmp
->
local_candidates
->
data
);
cmp
->
local_candidates
=
NULL
;
nice_candidate_free
(
cmp
->
local_candidates
->
data
);
cmp
->
local_candidates
=
g_slist_delete_link
(
cmp
->
local_candidates
,
cmp
->
local_candidates
);
}
g_slist_free_full
(
cmp
->
remote_candidates
,
g_slist_free_full
(
cmp
->
remote_candidates
,
(
GDestroyNotify
)
nice_candidate_free
);
(
GDestroyNotify
)
nice_candidate_free
);
cmp
->
remote_candidates
=
NULL
;
cmp
->
remote_candidates
=
NULL
;
...
...
configure.ac
View file @
375cde8a
...
@@ -248,7 +248,7 @@ AC_SUBST(gstplugin010dir)
...
@@ -248,7 +248,7 @@ AC_SUBST(gstplugin010dir)
AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
AM_CONDITIONAL(WITH_GSTREAMER010, test "$with_gstreamer010" = yes)
AM_CONDITIONAL(WITH_GSTREAMER010, test "$with_gstreamer010" = yes)
GUPNP_IGD_REQUIRED=0.
1.2
GUPNP_IGD_REQUIRED=0.
2.4
AC_ARG_ENABLE([gupnp],
AC_ARG_ENABLE([gupnp],
AS_HELP_STRING([--disable-gupnp],[Disable GUPnP IGD support]),
AS_HELP_STRING([--disable-gupnp],[Disable GUPnP IGD support]),
...
...
Write
Preview
Markdown
is supported
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