Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
a45b6fbd
Commit
a45b6fbd
authored
Jul 25, 2012
by
Ghislain MARY
Browse files
Add raddr and rport values in ICE candidate attributes in the SDP.
parent
dc308bc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
coreapi/sal_eXosip2_sdp.c
coreapi/sal_eXosip2_sdp.c
+13
-1
No files found.
coreapi/sal_eXosip2_sdp.c
View file @
a45b6fbd
...
...
@@ -227,9 +227,21 @@ static void add_payload(sdp_message_t *msg, int line, const PayloadType *pt, boo
static
void
add_candidate_attribute
(
sdp_message_t
*
msg
,
int
lineno
,
const
IceCandidate
*
candidate
)
{
char
buffer
[
1024
];
int
nb
;
snprintf
(
buffer
,
sizeof
(
buffer
),
"%s %d UDP %d %s %d typ %s"
,
nb
=
snprintf
(
buffer
,
sizeof
(
buffer
),
"%s %d UDP %d %s %d typ %s"
,
candidate
->
foundation
,
candidate
->
componentID
,
candidate
->
priority
,
candidate
->
taddr
.
ip
,
candidate
->
taddr
.
port
,
ice_candidate_type
(
candidate
));
if
(
nb
<
0
)
{
ms_error
(
"Cannot add ICE candidate attribute!"
);
return
;
}
if
(
candidate
->
type
!=
ICT_HostCandidate
)
{
nb
=
snprintf
(
buffer
+
nb
,
sizeof
(
buffer
)
-
nb
,
" raddr %s rport %d"
,
candidate
->
base
->
taddr
.
ip
,
candidate
->
base
->
taddr
.
port
);
if
(
nb
<
0
)
{
ms_error
(
"Cannot add ICE candidate attribute!"
);
return
;
}
}
sdp_message_a_attribute_add
(
msg
,
lineno
,
osip_strdup
(
"candidate"
),
osip_strdup
(
buffer
));
}
...
...
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