Commit b6200446 authored by Olivier Crête's avatar Olivier Crête

udp-turn: Don't expose GSocket

UDP turn sockets should never be read frm directly.
Because they may share the same socket with the non-relay,
so the incoming data may not be relayed and then the NiceSocket
API doesn't allow returning the base socket as the source.
parent 78b1212e
......@@ -650,10 +650,9 @@ static gboolean priv_conn_keepalive_tick_unlocked (NiceAgent *agent)
gchar tmpbuf[INET6_ADDRSTRLEN];
nice_address_to_string (&p->remote->addr, tmpbuf);
nice_debug ("Agent %p : Keepalive STUN-CC REQ to '%s:%u', "
"socket=%u (c-id:%u), username='%.*s' (%" G_GSIZE_FORMAT "), "
"(c-id:%u), username='%.*s' (%" G_GSIZE_FORMAT "), "
"password='%.*s' (%" G_GSIZE_FORMAT "), priority=%u.", agent,
tmpbuf, nice_address_get_port (&p->remote->addr),
g_socket_get_fd(((NiceSocket *)p->local->sockptr)->fileno),
component->id, (int) uname_len, uname, uname_len,
(int) password_len, password, password_len,
......@@ -241,7 +241,7 @@ nice_udp_turn_socket_new (GMainContext *ctx, NiceAddress *addr,
sock->fileno = base_socket->fileno;
sock->fileno = NULL;
sock->addr = *addr;
sock->send_messages = socket_send_messages;
sock->send_messages_reliable = socket_send_messages_reliable;
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