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
42358dde
Commit
42358dde
authored
Jan 31, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Don't make relayed sockets available in nice_agent_get_selected_socket()
Also document that fact.
parent
6605d57b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
agent/agent.c
agent/agent.c
+9
-4
agent/agent.h
agent/agent.h
+7
-1
No files found.
agent/agent.c
View file @
42358dde
...
@@ -2914,10 +2914,15 @@ nice_agent_get_selected_socket (NiceAgent *agent, guint stream_id,
...
@@ -2914,10 +2914,15 @@ nice_agent_get_selected_socket (NiceAgent *agent, guint stream_id,
&
stream
,
&
component
))
&
stream
,
&
component
))
goto
done
;
goto
done
;
if
(
component
->
selected_pair
.
local
&&
component
->
selected_pair
.
remote
)
{
if
(
!
component
->
selected_pair
.
local
||
!
component
->
selected_pair
.
remote
)
nice_socket
=
(
NiceSocket
*
)
component
->
selected_pair
.
local
->
sockptr
;
goto
done
;
g_socket
=
nice_socket
->
fileno
;
}
if
(
component
->
selected_pair
.
local
->
type
==
NICE_CANDIDATE_TYPE_RELAYED
)
goto
done
;
nice_socket
=
(
NiceSocket
*
)
component
->
selected_pair
.
local
->
sockptr
;
if
(
nice_socket
->
fileno
)
g_socket
=
g_object_ref
(
nice_socket
->
fileno
);
done:
done:
agent_unlock
();
agent_unlock
();
...
...
agent/agent.h
View file @
42358dde
...
@@ -737,7 +737,13 @@ nice_agent_get_selected_pair (
...
@@ -737,7 +737,13 @@ nice_agent_get_selected_pair (
* it. New applications are encouraged to use the built in libnice stream
* it. New applications are encouraged to use the built in libnice stream
* handling instead and let libnice handle the connection maintenance.
* handling instead and let libnice handle the connection maintenance.
*
*
* Returns: pointer to the socket, or NULL if there is no selected candidate
* Users of this method are encouraged to not use a TURN relay or any kind
* of proxy, as in this case, the socket will not be available to the
* application because the packets are encapsulated.
*
* Returns: (transfer full) pointer to the #GSocket, or NULL if there is no
* selected candidate or if the selected candidate is a relayed candidate.
*
* Since: 0.1.5
* Since: 0.1.5
*/
*/
GSocket
*
GSocket
*
...
...
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