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
8d4a4929
Commit
8d4a4929
authored
Apr 29, 2008
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add function to copy candidates
parent
6d178168
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
agent/candidate.c
agent/candidate.c
+18
-0
agent/candidate.h
agent/candidate.h
+3
-0
No files found.
agent/candidate.c
View file @
8d4a4929
...
...
@@ -45,6 +45,8 @@
# include <config.h>
#endif
#include <string.h>
#include "agent.h"
#include "component.h"
...
...
@@ -165,3 +167,19 @@ nice_candidate_pair_priority (guint32 o_prio, guint32 a_prio)
return
((
guint64
)
1
<<
32
)
*
min
+
2
*
max
+
(
o_prio
>
a_prio
?
1
:
0
);
}
/**
* Copies a candidate
*/
NICEAPI_EXPORT
NiceCandidate
*
nice_candidate_copy
(
const
NiceCandidate
*
candidate
)
{
NiceCandidate
*
copy
=
nice_candidate_new
(
candidate
->
type
);
memcpy
(
copy
,
candidate
,
sizeof
(
NiceCandidate
));
copy
->
username
=
g_strdup
(
copy
->
username
);
copy
->
password
=
g_strdup
(
copy
->
password
);
return
copy
;
}
agent/candidate.h
View file @
8d4a4929
...
...
@@ -103,6 +103,9 @@ nice_candidate_ice_priority (const NiceCandidate *candidate);
guint64
nice_candidate_pair_priority
(
guint32
o_prio
,
guint32
a_prio
);
NiceCandidate
*
nice_candidate_copy
(
const
NiceCandidate
*
candidate
);
G_END_DECLS
#endif
/* _CANDIDATE_H */
...
...
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