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
df2db74e
Commit
df2db74e
authored
May 20, 2010
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
discovery: Remove useless checks from discovery_add_local_host_candidate
parent
be2706da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
40 deletions
+32
-40
agent/discovery.c
agent/discovery.c
+32
-40
No files found.
agent/discovery.c
View file @
df2db74e
...
@@ -465,7 +465,6 @@ NiceCandidate *discovery_add_local_host_candidate (
...
@@ -465,7 +465,6 @@ NiceCandidate *discovery_add_local_host_candidate (
return
NULL
;
return
NULL
;
candidate
=
nice_candidate_new
(
NICE_CANDIDATE_TYPE_HOST
);
candidate
=
nice_candidate_new
(
NICE_CANDIDATE_TYPE_HOST
);
if
(
candidate
)
{
candidate
->
stream_id
=
stream_id
;
candidate
->
stream_id
=
stream_id
;
candidate
->
component_id
=
component_id
;
candidate
->
component_id
=
component_id
;
candidate
->
addr
=
*
address
;
candidate
->
addr
=
*
address
;
...
@@ -498,23 +497,16 @@ NiceCandidate *discovery_add_local_host_candidate (
...
@@ -498,23 +497,16 @@ NiceCandidate *discovery_add_local_host_candidate (
result
=
priv_add_local_candidate_pruned
(
component
,
candidate
);
result
=
priv_add_local_candidate_pruned
(
component
,
candidate
);
if
(
result
==
TRUE
)
{
if
(
result
==
TRUE
)
{
GSList
*
modified_list
=
g_slist_append
(
component
->
sockets
,
udp_socket
);
component
->
sockets
=
g_slist_append
(
component
->
sockets
,
udp_socket
);
if
(
modified_list
)
{
/* success: store a pointer to the sockaddr */
component
->
sockets
=
modified_list
;
agent_signal_new_candidate
(
agent
,
candidate
);
agent_signal_new_candidate
(
agent
,
candidate
);
}
else
{
/* error: list memory allocation */
candidate
=
NULL
;
/* note: candidate already owned by component */
}
}
else
{
}
else
{
/* error: memory allocation, or
duplicate candidates */
/* error:
duplicate candidates */
errors
=
TRUE
;
errors
=
TRUE
;
}
}
}
else
{
}
else
{
/* error: socket new */
/* error: socket new */
errors
=
TRUE
;
errors
=
TRUE
;
}
}
}
/* clean up after errors */
/* clean up after errors */
if
(
errors
)
{
if
(
errors
)
{
...
...
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