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
a41e12df
Commit
a41e12df
authored
Dec 17, 2010
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure we don't free a currently being-refreshed binding
parent
0d130b14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
socket/turn.c
socket/turn.c
+21
-0
No files found.
socket/turn.c
View file @
a41e12df
...
@@ -656,6 +656,27 @@ priv_binding_expired_timeout (gpointer data)
...
@@ -656,6 +656,27 @@ priv_binding_expired_timeout (gpointer data)
ChannelBinding
*
b
=
i
->
data
;
ChannelBinding
*
b
=
i
->
data
;
if
(
b
->
timeout_source
==
g_source_get_id
(
source
))
{
if
(
b
->
timeout_source
==
g_source_get_id
(
source
))
{
priv
->
channels
=
g_list_remove
(
priv
->
channels
,
b
);
priv
->
channels
=
g_list_remove
(
priv
->
channels
,
b
);
/* Make sure we don't free a currently being-refreshed binding */
if
(
priv
->
current_binding_msg
&&
!
priv
->
current_binding
)
{
struct
sockaddr
sa
;
socklen_t
sa_len
=
sizeof
(
sa
);
NiceAddress
to
;
/* look up binding associated with peer */
stun_message_find_xor_addr
(
&
priv
->
current_binding_msg
->
message
,
STUN_ATTRIBUTE_XOR_PEER_ADDRESS
,
&
sa
,
&
sa_len
);
nice_address_set_from_sockaddr
(
&
to
,
&
sa
);
/* If the binding is being refreshed, then move it to
priv->current_binding so it counts as a 'new' binding and
will get readded to the list if it succeeds */
if
(
nice_address_equal
(
&
b
->
peer
,
&
to
))
{
priv
->
current_binding
=
b
;
break
;
}
}
g_free
(
b
);
g_free
(
b
);
break
;
break
;
}
}
...
...
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