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
766bdaeb
Commit
766bdaeb
authored
Apr 16, 2014
by
Youness Alaoui
Committed by
Olivier Crête
May 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send reliable-transport-writable on reliable ice-tcp and drop bogus 'ice-tcp unsupported'
parent
31fb8f44
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
81 deletions
+72
-81
agent/agent.c
agent/agent.c
+72
-81
No files found.
agent/agent.c
View file @
766bdaeb
...
@@ -1686,8 +1686,7 @@ void agent_signal_new_selected_pair (NiceAgent *agent, guint stream_id,
...
@@ -1686,8 +1686,7 @@ void agent_signal_new_selected_pair (NiceAgent *agent, guint stream_id,
nice_udp_turn_socket_set_peer
(
lcandidate
->
sockptr
,
&
rcandidate
->
addr
);
nice_udp_turn_socket_set_peer
(
lcandidate
->
sockptr
,
&
rcandidate
->
addr
);
}
}
if
(
agent
->
reliable
)
{
if
(
agent
->
reliable
&&
!
nice_socket_is_reliable
(
lcandidate
->
sockptr
))
{
if
(
!
nice_socket_is_reliable
(
lcandidate
->
sockptr
))
{
if
(
!
component
->
tcp
)
if
(
!
component
->
tcp
)
pseudo_tcp_socket_create
(
agent
,
stream
,
component
);
pseudo_tcp_socket_create
(
agent
,
stream
,
component
);
process_queued_tcp_packets
(
agent
,
stream
,
component
);
process_queued_tcp_packets
(
agent
,
stream
,
component
);
...
@@ -1695,11 +1694,8 @@ void agent_signal_new_selected_pair (NiceAgent *agent, guint stream_id,
...
@@ -1695,11 +1694,8 @@ void agent_signal_new_selected_pair (NiceAgent *agent, guint stream_id,
pseudo_tcp_socket_connect
(
component
->
tcp
);
pseudo_tcp_socket_connect
(
component
->
tcp
);
pseudo_tcp_socket_notify_mtu
(
component
->
tcp
,
MAX_TCP_MTU
);
pseudo_tcp_socket_notify_mtu
(
component
->
tcp
,
MAX_TCP_MTU
);
adjust_tcp_clock
(
agent
,
stream
,
component
);
adjust_tcp_clock
(
agent
,
stream
,
component
);
}
else
{
nice_debug
(
"ICE-TCP not yet supported"
);
return
;
}
}
}
if
(
nice_debug_is_enabled
())
{
if
(
nice_debug_is_enabled
())
{
gchar
ip
[
100
];
gchar
ip
[
100
];
guint
port
;
guint
port
;
...
@@ -1743,6 +1739,11 @@ void agent_signal_new_selected_pair (NiceAgent *agent, guint stream_id,
...
@@ -1743,6 +1739,11 @@ void agent_signal_new_selected_pair (NiceAgent *agent, guint stream_id,
agent_queue_signal
(
agent
,
signals
[
SIGNAL_NEW_SELECTED_PAIR
],
agent_queue_signal
(
agent
,
signals
[
SIGNAL_NEW_SELECTED_PAIR
],
stream_id
,
component_id
,
lcandidate
->
foundation
,
rcandidate
->
foundation
);
stream_id
,
component_id
,
lcandidate
->
foundation
,
rcandidate
->
foundation
);
if
(
agent
->
reliable
&&
nice_socket_is_reliable
(
lcandidate
->
sockptr
))
{
agent_queue_signal
(
agent
,
signals
[
SIGNAL_RELIABLE_TRANSPORT_WRITABLE
],
stream_id
,
component_id
);
}
}
}
void
agent_signal_new_candidate
(
NiceAgent
*
agent
,
NiceCandidate
*
candidate
)
void
agent_signal_new_candidate
(
NiceAgent
*
agent
,
NiceCandidate
*
candidate
)
...
@@ -3120,12 +3121,6 @@ agent_recv_message_unlocked (
...
@@ -3120,12 +3121,6 @@ agent_recv_message_unlocked (
}
else
if
(
!
nice_socket_is_reliable
(
nicesock
))
{
}
else
if
(
!
nice_socket_is_reliable
(
nicesock
))
{
nice_debug
(
"Received data on a pseudo tcp FAILED component. Ignoring."
);
nice_debug
(
"Received data on a pseudo tcp FAILED component. Ignoring."
);
retval
=
RECV_OOB
;
goto
done
;
}
else
{
/* Received data on a reliable connection which has no TCP component. */
nice_debug
(
"Ice TCP unsupported
\n
"
);
retval
=
RECV_OOB
;
retval
=
RECV_OOB
;
goto
done
;
goto
done
;
}
}
...
@@ -4203,9 +4198,8 @@ component_io_cb (GSocket *gsocket, GIOCondition condition, gpointer user_data)
...
@@ -4203,9 +4198,8 @@ component_io_cb (GSocket *gsocket, GIOCondition condition, gpointer user_data)
* need to take the agent lock to change the Component’s io_callback. */
* need to take the agent lock to change the Component’s io_callback. */
g_assert
(
!
has_io_callback
||
component
->
recv_messages
==
NULL
);
g_assert
(
!
has_io_callback
||
component
->
recv_messages
==
NULL
);
if
(
agent
->
reliable
)
{
if
(
agent
->
reliable
&&
!
nice_socket_is_reliable
(
socket_source
->
socket
)
)
{
#define TCP_HEADER_SIZE 24
/* bytes */
#define TCP_HEADER_SIZE 24
/* bytes */
if
(
!
nice_socket_is_reliable
(
socket_source
->
socket
))
{
guint8
local_header_buf
[
TCP_HEADER_SIZE
];
guint8
local_header_buf
[
TCP_HEADER_SIZE
];
/* FIXME: Currently, the critical path for reliable packet delivery has two
/* FIXME: Currently, the critical path for reliable packet delivery has two
* memcpy()s: one into the pseudo-TCP receive buffer, and one out of it.
* memcpy()s: one into the pseudo-TCP receive buffer, and one out of it.
...
@@ -4268,9 +4262,6 @@ component_io_cb (GSocket *gsocket, GIOCondition condition, gpointer user_data)
...
@@ -4268,9 +4262,6 @@ component_io_cb (GSocket *gsocket, GIOCondition condition, gpointer user_data)
has_io_callback
=
component_has_io_callback
(
component
);
has_io_callback
=
component_has_io_callback
(
component
);
}
}
}
else
{
nice_debug
(
"unsupported ice-tcp"
);
}
}
else
if
(
has_io_callback
)
{
}
else
if
(
has_io_callback
)
{
while
(
has_io_callback
)
{
while
(
has_io_callback
)
{
guint8
local_buf
[
MAX_BUFFER_SIZE
];
guint8
local_buf
[
MAX_BUFFER_SIZE
];
...
...
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