Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
9b40e402
Commit
9b40e402
authored
4 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
misc: more {fmt}
Change-Id: I6985da3cbc3d4ad04eece34c143b417f1bdc8451
parent
9b94f3fd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ice_transport.cpp
+19
-20
19 additions, 20 deletions
src/ice_transport.cpp
with
19 additions
and
20 deletions
src/ice_transport.cpp
+
19
−
20
View file @
9b40e402
...
@@ -554,9 +554,9 @@ IceTransport::Impl::handleEvents(unsigned max_msec)
...
@@ -554,9 +554,9 @@ IceTransport::Impl::handleEvents(unsigned max_msec)
void
void
IceTransport
::
Impl
::
onComplete
(
pj_ice_strans
*
ice_st
,
pj_ice_strans_op
op
,
pj_status_t
status
)
IceTransport
::
Impl
::
onComplete
(
pj_ice_strans
*
ice_st
,
pj_ice_strans_op
op
,
pj_status_t
status
)
{
{
const
char
*
opname
=
op
==
PJ_ICE_STRANS_OP_INIT
const
char
*
opname
=
op
==
PJ_ICE_STRANS_OP_INIT
?
"initialization"
?
"initializ
ation"
:
op
==
PJ_ICE_STRANS_OP_NEGOTIATION
?
"negoti
ation"
:
op
==
PJ_ICE_STRANS_OP_NEGOTIATION
?
"negotiation"
:
"unknown_op"
;
:
"unknown_op"
;
const
bool
done
=
status
==
PJ_SUCCESS
;
const
bool
done
=
status
==
PJ_SUCCESS
;
if
(
done
)
{
if
(
done
)
{
...
@@ -1243,9 +1243,6 @@ IceTransport::getLocalCandidates(unsigned comp_id) const
...
@@ -1243,9 +1243,6 @@ IceTransport::getLocalCandidates(unsigned comp_id) const
res
.
reserve
(
cand_cnt
);
res
.
reserve
(
cand_cnt
);
for
(
unsigned
i
=
0
;
i
<
cand_cnt
;
++
i
)
{
for
(
unsigned
i
=
0
;
i
<
cand_cnt
;
++
i
)
{
std
::
ostringstream
val
;
char
ipaddr
[
PJ_INET6_ADDRSTRLEN
];
/** Section 4.5, RFC 6544 (https://tools.ietf.org/html/rfc6544)
/** Section 4.5, RFC 6544 (https://tools.ietf.org/html/rfc6544)
* candidate-attribute = "candidate" ":" foundation SP component-id
* candidate-attribute = "candidate" ":" foundation SP component-id
* SP "TCP" SP priority SP connection-address SP port SP cand-type [SP
* SP "TCP" SP priority SP connection-address SP port SP cand-type [SP
...
@@ -1256,31 +1253,33 @@ IceTransport::getLocalCandidates(unsigned comp_id) const
...
@@ -1256,31 +1253,33 @@ IceTransport::getLocalCandidates(unsigned comp_id) const
* tcp-type-ext = "tcptype" SP tcp-type
* tcp-type-ext = "tcptype" SP tcp-type
* tcp-type = "active" / "passive" / "so"
* tcp-type = "active" / "passive" / "so"
*/
*/
val
.
write
(
cand
[
i
].
foundation
.
ptr
,
cand
[
i
].
foundation
.
slen
);
char
ipaddr
[
PJ_INET6_ADDRSTRLEN
];
val
<<
" "
<<
std
::
to_string
(
cand
[
i
].
comp_id
);
std
::
string
tcp_type
;
val
<<
(
cand
[
i
].
transport
==
PJ_CAND_UDP
?
" UDP "
:
" TCP "
);
val
<<
std
::
to_string
(
cand
[
i
].
prio
);
val
<<
" "
<<
pj_sockaddr_print
(
&
cand
[
i
].
addr
,
ipaddr
,
sizeof
(
ipaddr
),
0
);
val
<<
" "
<<
std
::
to_string
((
unsigned
)
pj_sockaddr_get_port
(
&
cand
[
i
].
addr
));
val
<<
" typ "
<<
pj_ice_get_cand_type_name
(
cand
[
i
].
type
);
if
(
cand
[
i
].
transport
!=
PJ_CAND_UDP
)
{
if
(
cand
[
i
].
transport
!=
PJ_CAND_UDP
)
{
val
<<
" tcptype"
;
tcp_type
+=
" tcptype"
;
switch
(
cand
[
i
].
transport
)
{
switch
(
cand
[
i
].
transport
)
{
case
PJ_CAND_TCP_ACTIVE
:
case
PJ_CAND_TCP_ACTIVE
:
val
<<
" active"
;
tcp_type
+=
" active"
;
break
;
break
;
case
PJ_CAND_TCP_PASSIVE
:
case
PJ_CAND_TCP_PASSIVE
:
val
<<
" passive"
;
tcp_type
+=
" passive"
;
break
;
break
;
case
PJ_CAND_TCP_SO
:
case
PJ_CAND_TCP_SO
:
default:
default:
val
<<
" so"
;
tcp_type
+=
" so"
;
break
;
break
;
}
}
}
}
res
.
emplace_back
(
res
.
emplace_back
(
val
.
str
());
fmt
::
format
(
"{} {} {} {} {} {} typ {}{}"
,
std
::
string_view
(
cand
[
i
].
foundation
.
ptr
,
cand
[
i
].
foundation
.
slen
),
cand
[
i
].
comp_id
,
(
cand
[
i
].
transport
==
PJ_CAND_UDP
?
"UDP"
:
"TCP"
),
cand
[
i
].
prio
,
pj_sockaddr_print
(
&
cand
[
i
].
addr
,
ipaddr
,
sizeof
(
ipaddr
),
0
),
pj_sockaddr_get_port
(
&
cand
[
i
].
addr
),
pj_ice_get_cand_type_name
(
cand
[
i
].
type
),
tcp_type
));
}
}
return
res
;
return
res
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment