Commit ae614812 authored by Youness Alaoui's avatar Youness Alaoui
Browse files

make nice_socket_send return a boolean so we can know whether or not the send worked

parent dda96974
......@@ -1351,10 +1351,10 @@ nice_agent_send (
sock = component->selected_pair.local->sockptr;
addr = &component->selected_pair.remote->addr;
nice_socket_send (sock, addr, len, buf);
component->media_after_tick = TRUE;
ret = len;
if (nice_socket_send (sock, addr, len, buf)) {
component->media_after_tick = TRUE;
ret = len;
}
goto done;
}
......
......@@ -726,7 +726,7 @@ NiceCandidate *discovery_learn_remote_peer_reflexive_candidate (
candidate->transport = NICE_CANDIDATE_TRANSPORT_UDP;
candidate->addr = *remote_address;
candidate->base_addr = *remote_address;
candidate->priority = priority;;
candidate->priority = priority;
candidate->stream_id = stream->id;
candidate->component_id = component->id;
......
......@@ -54,14 +54,14 @@ nice_socket_recv (
return sock->recv (sock, from, len, buf);
}
void
gboolean
nice_socket_send (
NiceSocket *sock,
const NiceAddress *to,
guint len,
const gchar *buf)
{
sock->send (sock, to, len, buf);
return sock->send (sock, to, len, buf);
}
gboolean
......
......@@ -75,7 +75,7 @@ nice_socket_recv (
guint len,
gchar *buf);
void
gboolean
nice_socket_send (
NiceSocket *sock,
const NiceAddress *to,
......
......@@ -607,8 +607,7 @@ socket_send (
memcpy (buffer + sizeof(uint32_t), buf, len);
msg_len = len + sizeof(uint32_t);
} else {
nice_socket_send (priv->base_socket, &priv->server_addr, len, buf);
return TRUE;
return nice_socket_send (priv->base_socket, &priv->server_addr, len, buf);
}
} else {
if (priv->compatibility == NICE_UDP_TURN_SOCKET_COMPATIBILITY_DRAFT9) {
......@@ -650,14 +649,11 @@ socket_send (
}
if (msg_len > 0) {
nice_socket_send (priv->base_socket, &priv->server_addr,
return nice_socket_send (priv->base_socket, &priv->server_addr,
msg_len, (gchar *)buffer);
return TRUE;
}
send:
nice_socket_send (priv->base_socket, to, len, buf);
return TRUE;
return nice_socket_send (priv->base_socket, to, len, buf);
}
static gboolean
......
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