diff options
-rw-r--r-- | agent/agent.c | 8 | ||||
-rw-r--r-- | agent/discovery.c | 2 | ||||
-rw-r--r-- | socket/socket.c | 4 | ||||
-rw-r--r-- | socket/socket.h | 2 | ||||
-rw-r--r-- | socket/udp-turn.c | 10 |
5 files changed, 11 insertions, 15 deletions
diff --git a/agent/agent.c b/agent/agent.c index 829afab..c1db69f 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -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; } diff --git a/agent/discovery.c b/agent/discovery.c index d8e5bf6..3fc74ea 100644 --- a/agent/discovery.c +++ b/agent/discovery.c @@ -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; diff --git a/socket/socket.c b/socket/socket.c index 3c73d58..146f864 100644 --- a/socket/socket.c +++ b/socket/socket.c @@ -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 diff --git a/socket/socket.h b/socket/socket.h index a7e4aa5..a8e17d3 100644 --- a/socket/socket.h +++ b/socket/socket.h @@ -75,7 +75,7 @@ nice_socket_recv ( guint len, gchar *buf); -void +gboolean nice_socket_send ( NiceSocket *sock, const NiceAddress *to, diff --git a/socket/udp-turn.c b/socket/udp-turn.c index 308e438..de35acc 100644 --- a/socket/udp-turn.c +++ b/socket/udp-turn.c @@ -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 |