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
b2189b84
Commit
b2189b84
authored
Mar 27, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Prevent gather from being called multiple times
This can cause odd behaviors as it is not a idempotent function.
parent
b66a1aed
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
agent/agent.c
agent/agent.c
+7
-1
agent/stream.h
agent/stream.h
+1
-0
No files found.
agent/agent.c
View file @
b2189b84
...
...
@@ -2123,6 +2123,12 @@ nice_agent_gather_candidates (
return
FALSE
;
}
if
(
stream
->
gathering_started
)
{
/* Stream is already gathering, ignore this call */
agent_unlock_and_emit
(
agent
);
return
TRUE
;
}
nice_debug
(
"Agent %p : In %s mode, starting candidate gathering."
,
agent
,
agent
->
full_mode
?
"ICE-FULL"
:
"ICE-LITE"
);
...
...
@@ -2276,7 +2282,7 @@ nice_agent_gather_candidates (
}
stream
->
gathering
=
TRUE
;
stream
->
gathering_started
=
TRUE
;
/* Only signal the new candidates after we're sure that the gathering was
* succesfful. But before sending gathering-done */
...
...
agent/stream.h
View file @
b2189b84
...
...
@@ -72,6 +72,7 @@ struct _Stream
gchar
remote_ufrag
[
NICE_STREAM_MAX_UFRAG
];
gchar
remote_password
[
NICE_STREAM_MAX_PWD
];
gboolean
gathering
;
gboolean
gathering_started
;
gint
tos
;
};
...
...
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