Commit 766bdaeb authored by Youness Alaoui's avatar Youness Alaoui Committed by Olivier Crête

Send reliable-transport-writable on reliable ice-tcp and drop bogus 'ice-tcp unsupported'

parent 31fb8f44
......@@ -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);
}
if(agent->reliable) {
if (!nice_socket_is_reliable (lcandidate->sockptr)) {
if(agent->reliable && !nice_socket_is_reliable (lcandidate->sockptr)) {
if (!component->tcp)
pseudo_tcp_socket_create (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,
pseudo_tcp_socket_connect (component->tcp);
pseudo_tcp_socket_notify_mtu (component->tcp, MAX_TCP_MTU);
adjust_tcp_clock (agent, stream, component);
} else {
nice_debug ("ICE-TCP not yet supported");
return;
}
}
if (nice_debug_is_enabled ()) {
gchar ip[100];
guint port;
......@@ -1743,6 +1739,11 @@ void agent_signal_new_selected_pair (NiceAgent *agent, guint stream_id,
agent_queue_signal (agent, signals[SIGNAL_NEW_SELECTED_PAIR],
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)
......@@ -3120,12 +3121,6 @@ agent_recv_message_unlocked (
} else if (!nice_socket_is_reliable (nicesock)) {
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;
goto done;
}
......@@ -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. */
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 */
if (!nice_socket_is_reliable (socket_source->socket)) {
guint8 local_header_buf[TCP_HEADER_SIZE];
/* 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.
......@@ -4268,9 +4262,6 @@ component_io_cb (GSocket *gsocket, GIOCondition condition, gpointer user_data)
has_io_callback = component_has_io_callback (component);
}
} else {
nice_debug ("unsupported ice-tcp");
}
} else if (has_io_callback) {
while (has_io_callback) {
guint8 local_buf[MAX_BUFFER_SIZE];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment