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
ad88bc3d
Commit
ad88bc3d
authored
Feb 12, 2020
by
Fabrice Bellet
Committed by
Olivier Crête
May 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conncheck: rename peer-reflexive priority to stun-priority
parent
f997215d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
15 deletions
+15
-15
agent/agent.c
agent/agent.c
+1
-1
agent/component.c
agent/component.c
+1
-1
agent/component.h
agent/component.h
+1
-1
agent/conncheck.c
agent/conncheck.c
+11
-11
agent/conncheck.h
agent/conncheck.h
+1
-1
No files found.
agent/agent.c
View file @
ad88bc3d
...
@@ -3505,7 +3505,7 @@ static void priv_update_pair_foundations (NiceAgent *agent,
...
@@ -3505,7 +3505,7 @@ static void priv_update_pair_foundations (NiceAgent *agent,
gchar
priority
[
NICE_CANDIDATE_PAIR_PRIORITY_MAX_SIZE
];
gchar
priority
[
NICE_CANDIDATE_PAIR_PRIORITY_MAX_SIZE
];
/* the foundation update of the selected pair also implies
/* the foundation update of the selected pair also implies
* an update of its priority.
prflx
_priority doesn't change
* an update of its priority.
stun
_priority doesn't change
* because only the remote candidate foundation is modified.
* because only the remote candidate foundation is modified.
*/
*/
nice_debug
(
"Agent %p : pair %p is the selected pair, updating "
nice_debug
(
"Agent %p : pair %p is the selected pair, updating "
...
...
agent/component.c
View file @
ad88bc3d
...
@@ -503,7 +503,7 @@ nice_component_update_selected_pair (NiceAgent *agent, NiceComponent *component,
...
@@ -503,7 +503,7 @@ nice_component_update_selected_pair (NiceAgent *agent, NiceComponent *component,
component
->
selected_pair
.
local
=
pair
->
local
;
component
->
selected_pair
.
local
=
pair
->
local
;
component
->
selected_pair
.
remote
=
pair
->
remote
;
component
->
selected_pair
.
remote
=
pair
->
remote
;
component
->
selected_pair
.
priority
=
pair
->
priority
;
component
->
selected_pair
.
priority
=
pair
->
priority
;
component
->
selected_pair
.
prflx_priority
=
pair
->
prflx
_priority
;
component
->
selected_pair
.
stun_priority
=
pair
->
stun
_priority
;
nice_component_add_valid_candidate
(
agent
,
component
,
pair
->
remote
);
nice_component_add_valid_candidate
(
agent
,
component
,
pair
->
remote
);
}
}
...
...
agent/component.h
View file @
ad88bc3d
...
@@ -83,7 +83,7 @@ struct _CandidatePair
...
@@ -83,7 +83,7 @@ struct _CandidatePair
NiceCandidate
*
local
;
NiceCandidate
*
local
;
NiceCandidate
*
remote
;
NiceCandidate
*
remote
;
guint64
priority
;
/* candidate pair priority */
guint64
priority
;
/* candidate pair priority */
guint32
prflx
_priority
;
guint32
stun
_priority
;
CandidatePairKeepalive
keepalive
;
CandidatePairKeepalive
keepalive
;
};
};
...
...
agent/conncheck.c
View file @
ad88bc3d
...
@@ -298,7 +298,7 @@ priv_print_conn_check_lists (NiceAgent *agent, const gchar *where, const gchar *
...
@@ -298,7 +298,7 @@ priv_print_conn_check_lists (NiceAgent *agent, const gchar *where, const gchar *
local_addr
,
nice_address_get_port
(
&
pair
->
local
->
addr
),
local_addr
,
nice_address_get_port
(
&
pair
->
local
->
addr
),
priv_candidate_transport_to_string
(
pair
->
remote
->
transport
),
priv_candidate_transport_to_string
(
pair
->
remote
->
transport
),
remote_addr
,
nice_address_get_port
(
&
pair
->
remote
->
addr
),
remote_addr
,
nice_address_get_port
(
&
pair
->
remote
->
addr
),
priority
,
pair
->
prflx
_priority
,
priority
,
pair
->
stun
_priority
,
priv_state_to_gchar
(
pair
->
state
),
priv_state_to_gchar
(
pair
->
state
),
pair
->
valid
?
"V"
:
""
,
pair
->
valid
?
"V"
:
""
,
pair
->
nominated
?
"N"
:
""
,
pair
->
nominated
?
"N"
:
""
,
...
@@ -1493,7 +1493,7 @@ static guint32 peer_reflexive_candidate_priority (NiceAgent *agent,
...
@@ -1493,7 +1493,7 @@ static guint32 peer_reflexive_candidate_priority (NiceAgent *agent,
* concerned too, because no STUN request is sent with a local candidate
* concerned too, because no STUN request is sent with a local candidate
* of this type.
* of this type.
*/
*/
static
guint32
stun_request_pr
flx_pr
iority
(
NiceAgent
*
agent
,
static
guint32
stun_request_priority
(
NiceAgent
*
agent
,
NiceCandidate
*
local_candidate
)
NiceCandidate
*
local_candidate
)
{
{
if
(
local_candidate
->
type
==
NICE_CANDIDATE_TYPE_HOST
)
if
(
local_candidate
->
type
==
NICE_CANDIDATE_TYPE_HOST
)
...
@@ -1610,7 +1610,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
...
@@ -1610,7 +1610,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
agent
,
tmpbuf
,
nice_address_get_port
(
&
p
->
remote
->
addr
),
agent
,
tmpbuf
,
nice_address_get_port
(
&
p
->
remote
->
addr
),
component
->
id
,
(
int
)
uname_len
,
uname
,
uname_len
,
component
->
id
,
(
int
)
uname_len
,
uname
,
uname_len
,
(
int
)
password_len
,
password
,
password_len
,
(
int
)
password_len
,
password
,
password_len
,
p
->
prflx
_priority
);
p
->
stun
_priority
);
}
}
if
(
uname_len
>
0
)
{
if
(
uname_len
>
0
)
{
buf_len
=
stun_usage_ice_conncheck_create
(
&
component
->
stun_agent
,
buf_len
=
stun_usage_ice_conncheck_create
(
&
component
->
stun_agent
,
...
@@ -1618,7 +1618,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
...
@@ -1618,7 +1618,7 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
sizeof
(
p
->
keepalive
.
stun_buffer
),
sizeof
(
p
->
keepalive
.
stun_buffer
),
uname
,
uname_len
,
password
,
password_len
,
uname
,
uname_len
,
password
,
password_len
,
agent
->
controlling_mode
,
agent
->
controlling_mode
,
agent
->
controlling_mode
,
agent
->
controlling_mode
,
p
->
prflx
_priority
,
p
->
stun
_priority
,
agent
->
tie_breaker
,
agent
->
tie_breaker
,
NULL
,
NULL
,
agent_to_ice_compatibility
(
agent
));
agent_to_ice_compatibility
(
agent
));
...
@@ -2223,7 +2223,7 @@ conn_check_update_selected_pair (NiceAgent *agent, NiceComponent *component,
...
@@ -2223,7 +2223,7 @@ conn_check_update_selected_pair (NiceAgent *agent, NiceComponent *component,
cpair
.
local
=
pair
->
local
;
cpair
.
local
=
pair
->
local
;
cpair
.
remote
=
pair
->
remote
;
cpair
.
remote
=
pair
->
remote
;
cpair
.
priority
=
pair
->
priority
;
cpair
.
priority
=
pair
->
priority
;
cpair
.
prflx_priority
=
pair
->
prflx
_priority
;
cpair
.
stun_priority
=
pair
->
stun
_priority
;
nice_component_update_selected_pair
(
agent
,
component
,
&
cpair
);
nice_component_update_selected_pair
(
agent
,
component
,
&
cpair
);
...
@@ -2470,7 +2470,7 @@ static CandidateCheckPair *priv_add_new_check_pair (NiceAgent *agent,
...
@@ -2470,7 +2470,7 @@ static CandidateCheckPair *priv_add_new_check_pair (NiceAgent *agent,
tmpbuf1
,
nice_address_get_port
(
&
pair
->
local
->
addr
),
tmpbuf1
,
nice_address_get_port
(
&
pair
->
local
->
addr
),
tmpbuf2
,
nice_address_get_port
(
&
pair
->
remote
->
addr
));
tmpbuf2
,
nice_address_get_port
(
&
pair
->
remote
->
addr
));
}
}
pair
->
prflx_priority
=
stun_request_prflx
_priority
(
agent
,
local
);
pair
->
stun_priority
=
stun_request
_priority
(
agent
,
local
);
stream
->
conncheck_list
=
g_slist_insert_sorted
(
stream
->
conncheck_list
,
pair
,
stream
->
conncheck_list
=
g_slist_insert_sorted
(
stream
->
conncheck_list
,
pair
,
(
GCompareFunc
)
conn_check_compare
);
(
GCompareFunc
)
conn_check_compare
);
...
@@ -2991,7 +2991,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
...
@@ -2991,7 +2991,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
(
unsigned
long
long
)
agent
->
tie_breaker
,
(
unsigned
long
long
)
agent
->
tie_breaker
,
(
int
)
uname_len
,
uname
,
uname_len
,
(
int
)
uname_len
,
uname
,
uname_len
,
(
int
)
password_len
,
password
,
password_len
,
(
int
)
password_len
,
password
,
password_len
,
pair
->
prflx
_priority
,
pair
->
stun
_priority
,
controlling
?
"controlling"
:
"controlled"
);
controlling
?
"controlling"
:
"controlled"
);
}
}
...
@@ -3032,7 +3032,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
...
@@ -3032,7 +3032,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
buffer_len
=
stun_usage_ice_conncheck_create
(
&
component
->
stun_agent
,
buffer_len
=
stun_usage_ice_conncheck_create
(
&
component
->
stun_agent
,
&
stun
->
message
,
stun
->
buffer
,
sizeof
(
stun
->
buffer
),
&
stun
->
message
,
stun
->
buffer
,
sizeof
(
stun
->
buffer
),
uname
,
uname_len
,
password
,
password_len
,
uname
,
uname_len
,
password
,
password_len
,
cand_use
,
controlling
,
pair
->
prflx
_priority
,
cand_use
,
controlling
,
pair
->
stun
_priority
,
agent
->
tie_breaker
,
agent
->
tie_breaker
,
pair
->
local
->
foundation
,
pair
->
local
->
foundation
,
agent_to_ice_compatibility
(
agent
));
agent_to_ice_compatibility
(
agent
));
...
@@ -3419,9 +3419,9 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint
...
@@ -3419,9 +3419,9 @@ static CandidateCheckPair *priv_add_peer_reflexive_pair (NiceAgent *agent, guint
* the parent succeeded pair. This value is not required for discovered
* the parent succeeded pair. This value is not required for discovered
* pair, that won't emit stun requests themselves, but may be used when
* pair, that won't emit stun requests themselves, but may be used when
* such pair becomes the selected pair, and when keepalive stun are emitted,
* such pair becomes the selected pair, and when keepalive stun are emitted,
* using the sockptr and
prflx
_priority values from the succeeded pair.
* using the sockptr and
stun
_priority values from the succeeded pair.
*/
*/
pair
->
prflx_priority
=
parent_pair
->
prflx
_priority
;
pair
->
stun_priority
=
parent_pair
->
stun
_priority
;
nice_debug
(
"Agent %p : added a new peer-discovered pair %p with "
nice_debug
(
"Agent %p : added a new peer-discovered pair %p with "
"foundation '%s' and transport %s:%s to stream %u component %u"
,
"foundation '%s' and transport %s:%s to stream %u component %u"
,
agent
,
pair
,
pair
->
foundation
,
agent
,
pair
,
pair
->
foundation
,
...
@@ -3551,7 +3551,7 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
...
@@ -3551,7 +3551,7 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent *
local_cand
=
discovery_add_peer_reflexive_candidate
(
agent
,
local_cand
=
discovery_add_peer_reflexive_candidate
(
agent
,
stream
->
id
,
stream
->
id
,
component
->
id
,
component
->
id
,
p
->
prflx
_priority
,
p
->
stun
_priority
,
&
mapped
,
&
mapped
,
sockptr
,
sockptr
,
local_candidate
,
local_candidate
,
...
...
agent/conncheck.h
View file @
ad88bc3d
...
@@ -98,7 +98,7 @@ struct _CandidateCheckPair
...
@@ -98,7 +98,7 @@ struct _CandidateCheckPair
CandidateCheckPair
*
discovered_pair
;
CandidateCheckPair
*
discovered_pair
;
CandidateCheckPair
*
succeeded_pair
;
CandidateCheckPair
*
succeeded_pair
;
guint64
priority
;
guint64
priority
;
guint32
prflx
_priority
;
guint32
stun
_priority
;
GSList
*
stun_transactions
;
/* a list of ongoing stun requests */
GSList
*
stun_transactions
;
/* a list of ongoing stun requests */
};
};
...
...
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