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
ee16b91f
Commit
ee16b91f
authored
May 20, 2010
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Remove useless checks from priv_add_remote_candidate
parent
5aa6553b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
34 deletions
+30
-34
agent/agent.c
agent/agent.c
+30
-34
No files found.
agent/agent.c
View file @
ee16b91f
...
...
@@ -1976,47 +1976,43 @@ static gboolean priv_add_remote_candidate (
candidate
=
nice_candidate_new
(
type
);
if
(
candidate
)
{
GSList
*
modified_list
=
g_slist_append
(
component
->
remote_candidates
,
candidate
);
if
(
modified_list
)
{
component
->
remote_candidates
=
modified_list
;
candidate
->
stream_id
=
stream_id
;
candidate
->
component_id
=
component_id
;
candidate
->
type
=
type
;
if
(
addr
)
candidate
->
addr
=
*
addr
;
{
gchar
tmpbuf
[
INET6_ADDRSTRLEN
]
=
{
0
};
if
(
addr
)
nice_address_to_string
(
addr
,
tmpbuf
);
nice_debug
(
"Agent %p : Adding remote candidate with addr [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s' prio: %u"
,
agent
,
tmpbuf
,
addr
?
nice_address_get_port
(
addr
)
:
0
,
stream_id
,
component_id
,
username
,
password
,
priority
);
}
component
->
remote_candidates
=
g_slist_append
(
component
->
remote_candidates
,
candidate
);
candidate
->
stream_id
=
stream_id
;
candidate
->
component_id
=
component_id
;
candidate
->
type
=
type
;
if
(
addr
)
candidate
->
addr
=
*
addr
;
{
gchar
tmpbuf
[
INET6_ADDRSTRLEN
]
=
{
0
};
if
(
addr
)
nice_address_to_string
(
addr
,
tmpbuf
);
nice_debug
(
"Agent %p : Adding remote candidate with addr [%s]:%u"
" for s%d/c%d. U/P '%s'/'%s' prio: %u"
,
agent
,
tmpbuf
,
addr
?
nice_address_get_port
(
addr
)
:
0
,
stream_id
,
component_id
,
username
,
password
,
priority
);
}
if
(
base_addr
)
candidate
->
base_addr
=
*
base_addr
;
if
(
base_addr
)
candidate
->
base_addr
=
*
base_addr
;
candidate
->
transport
=
transport
;
candidate
->
priority
=
priority
;
candidate
->
username
=
g_strdup
(
username
);
candidate
->
password
=
g_strdup
(
password
);
candidate
->
transport
=
transport
;
candidate
->
priority
=
priority
;
candidate
->
username
=
g_strdup
(
username
);
candidate
->
password
=
g_strdup
(
password
);
if
(
foundation
)
g_strlcpy
(
candidate
->
foundation
,
foundation
,
NICE_CANDIDATE_MAX_FOUNDATION
);
if
(
foundation
)
g_strlcpy
(
candidate
->
foundation
,
foundation
,
NICE_CANDIDATE_MAX_FOUNDATION
);
if
(
conn_check_add_for_candidate
(
agent
,
stream_id
,
component
,
candidate
)
<
0
)
error_flag
=
TRUE
;
}
else
/* memory alloc error: list insert */
error_flag
=
TRUE
;
if
(
conn_check_add_for_candidate
(
agent
,
stream_id
,
component
,
candidate
)
<
0
)
error_flag
=
TRUE
;
}
else
/* memory alloc error: candidate creation */
error_flag
=
TRUE
;
}
}
if
(
error_flag
)
{
if
(
candidate
)
...
...
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