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
f6b4a73b
Commit
f6b4a73b
authored
May 03, 2020
by
Fabrice Bellet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conncheck: fix some missing loop exit cases
The refresh list may be modified while being iterated
parent
3220abce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
agent/conncheck.c
agent/conncheck.c
+5
-1
No files found.
agent/conncheck.c
View file @
f6b4a73b
...
@@ -4048,6 +4048,7 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
...
@@ -4048,6 +4048,7 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
/* handle alternate server */
/* handle alternate server */
nice_address_set_from_sockaddr
(
&
addr
,
&
alternate
.
addr
);
nice_address_set_from_sockaddr
(
&
addr
,
&
alternate
.
addr
);
priv_handle_turn_alternate_server
(
agent
,
d
,
d
->
server
,
addr
);
priv_handle_turn_alternate_server
(
agent
,
d
,
d
->
server
,
addr
);
trans_found
=
TRUE
;
}
else
if
(
res
==
STUN_USAGE_TURN_RETURN_RELAY_SUCCESS
||
}
else
if
(
res
==
STUN_USAGE_TURN_RETURN_RELAY_SUCCESS
||
res
==
STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS
)
{
res
==
STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS
)
{
/* case: successful allocate, create a new local candidate */
/* case: successful allocate, create a new local candidate */
...
@@ -4245,8 +4246,9 @@ static gboolean priv_map_reply_to_relay_refresh (NiceAgent *agent, StunMessage *
...
@@ -4245,8 +4246,9 @@ static gboolean priv_map_reply_to_relay_refresh (NiceAgent *agent, StunMessage *
StunTransactionId
response_id
;
StunTransactionId
response_id
;
stun_message_id
(
resp
,
response_id
);
stun_message_id
(
resp
,
response_id
);
for
(
i
=
agent
->
refresh_list
;
i
&&
trans_found
!=
TRUE
;
i
=
i
->
next
)
{
for
(
i
=
agent
->
refresh_list
;
i
&&
trans_found
!=
TRUE
;)
{
CandidateRefresh
*
cand
=
i
->
data
;
CandidateRefresh
*
cand
=
i
->
data
;
GSList
*
next
=
i
->
next
;
if
(
!
cand
->
disposing
&&
cand
->
stun_message
.
buffer
)
{
if
(
!
cand
->
disposing
&&
cand
->
stun_message
.
buffer
)
{
stun_message_id
(
&
cand
->
stun_message
,
refresh_id
);
stun_message_id
(
&
cand
->
stun_message
,
refresh_id
);
...
@@ -4266,6 +4268,7 @@ static gboolean priv_map_reply_to_relay_refresh (NiceAgent *agent, StunMessage *
...
@@ -4266,6 +4268,7 @@ static gboolean priv_map_reply_to_relay_refresh (NiceAgent *agent, StunMessage *
g_source_destroy
(
cand
->
tick_source
);
g_source_destroy
(
cand
->
tick_source
);
g_source_unref
(
cand
->
tick_source
);
g_source_unref
(
cand
->
tick_source
);
cand
->
tick_source
=
NULL
;
cand
->
tick_source
=
NULL
;
trans_found
=
TRUE
;
}
else
if
(
res
==
STUN_USAGE_TURN_RETURN_ERROR
)
{
}
else
if
(
res
==
STUN_USAGE_TURN_RETURN_ERROR
)
{
int
code
=
-
1
;
int
code
=
-
1
;
uint8_t
*
sent_realm
=
NULL
;
uint8_t
*
sent_realm
=
NULL
;
...
@@ -4308,6 +4311,7 @@ static gboolean priv_map_reply_to_relay_refresh (NiceAgent *agent, StunMessage *
...
@@ -4308,6 +4311,7 @@ static gboolean priv_map_reply_to_relay_refresh (NiceAgent *agent, StunMessage *
}
}
}
}
}
}
i
=
next
;
}
}
return
trans_found
;
return
trans_found
;
...
...
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