Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Olivier Crête
libnice
Commits
6fb00faa
Commit
6fb00faa
authored
Aug 09, 2014
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: Remove socket source on HUP
parent
fcb1b84f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
agent/agent.c
agent/agent.c
+18
-0
No files found.
agent/agent.c
View file @
6fb00faa
...
...
@@ -4645,6 +4645,24 @@ component_io_cb (GSocket *gsocket, GIOCondition condition, gpointer user_data)
g_object_ref
(
agent
);
/* Remove disconnected sockets when we get a HUP */
if
(
condition
&
G_IO_HUP
)
{
nice_debug
(
"Agent %p: NiceSocket %p has received HUP"
,
agent
,
socket_source
->
socket
);
if
(
component
->
selected_pair
.
local
&&
component
->
selected_pair
.
local
->
sockptr
==
socket_source
->
socket
&&
component
->
state
==
NICE_COMPONENT_STATE_READY
)
{
nice_debug
(
"Agent %p: Selected pair socket %p has HUP, declaring failed"
,
agent
,
socket_source
->
socket
);
agent_signal_component_state_change
(
agent
,
stream
->
id
,
component
->
id
,
NICE_COMPONENT_STATE_FAILED
);
}
component_detach_socket
(
component
,
socket_source
->
socket
);
agent_unlock
();
return
G_SOURCE_REMOVE
;
}
has_io_callback
=
component_has_io_callback
(
component
);
/* Choose which receive buffer to use. If we’re reading for
...
...
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