Commit 4ee70c86 authored by Youness Alaoui's avatar Youness Alaoui

Merge remote branch 'tester/misc-fixes' into nice-kakaroto

Conflicts:
	agent/agent.c
parents 358a999f 3b16d8b0
This diff is collapsed.
...@@ -385,6 +385,8 @@ gboolean nice_agent_set_relay_info( ...@@ -385,6 +385,8 @@ gboolean nice_agent_set_relay_info(
* Start the candidate gathering process. * Start the candidate gathering process.
* Once done, #NiceAgent::candidate-gathering-done is called for the stream * Once done, #NiceAgent::candidate-gathering-done is called for the stream
* *
* Returns: %FALSE if there were no local addresses and they couldn't be discovered. In this case, call nice_agent_add_local_address() first.
*
* See also: nice_agent_add_local_address() * See also: nice_agent_add_local_address()
<note> <note>
<para> <para>
...@@ -397,7 +399,7 @@ gboolean nice_agent_set_relay_info( ...@@ -397,7 +399,7 @@ gboolean nice_agent_set_relay_info(
</para> </para>
</note> </note>
*/ */
void gboolean
nice_agent_gather_candidates ( nice_agent_gather_candidates (
NiceAgent *agent, NiceAgent *agent,
guint stream_id); guint stream_id);
......
...@@ -310,20 +310,10 @@ component_set_selected_remote_candidate (NiceAgent *agent, Component *component, ...@@ -310,20 +310,10 @@ component_set_selected_remote_candidate (NiceAgent *agent, Component *component,
candidate->transport); candidate->transport);
if (!remote) { if (!remote) {
GSList *modified_list = NULL;
remote = nice_candidate_copy (candidate); remote = nice_candidate_copy (candidate);
component->remote_candidates = g_slist_append (component->remote_candidates,
modified_list = g_slist_append (component->remote_candidates, remote);
remote); agent_signal_new_remote_candidate (agent, remote);
if (modified_list) {
component->remote_candidates = modified_list;
agent_signal_new_remote_candidate (agent, remote);
}
else { /* error: memory alloc / list */
nice_candidate_free (remote), remote = NULL;
return NULL;
}
} }
if (component->selected_pair.keepalive.tick_source != NULL) { if (component->selected_pair.keepalive.tick_source != NULL) {
......
This diff is collapsed.
This diff is collapsed.
...@@ -52,27 +52,12 @@ stream_new (guint n_components) ...@@ -52,27 +52,12 @@ stream_new (guint n_components)
{ {
Stream *stream; Stream *stream;
guint n; guint n;
gboolean errors = FALSE;
GSList *modified_list;
Component *component; Component *component;
stream = g_slice_new0 (Stream); stream = g_slice_new0 (Stream);
for (n = 0; n < n_components; n++) { for (n = 0; n < n_components; n++) {
component = component_new (n + 1); component = component_new (n + 1);
if (component) { stream->components = g_slist_append (stream->components, component);
modified_list = g_slist_append (stream->components, component);
if (modified_list)
stream->components = modified_list;
else
errors = TRUE;
}
else
errors = TRUE;
}
if (errors) {
stream_free (stream);
return NULL;
} }
stream->n_components = n_components; stream->n_components = n_components;
......
...@@ -91,7 +91,7 @@ nice_tcp_bsd_socket_new (NiceAgent *agent, GMainContext *ctx, NiceAddress *addr) ...@@ -91,7 +91,7 @@ nice_tcp_bsd_socket_new (NiceAgent *agent, GMainContext *ctx, NiceAddress *addr)
int ret; int ret;
struct sockaddr_storage name; struct sockaddr_storage name;
guint name_len = sizeof (name); guint name_len = sizeof (name);
NiceSocket *sock = g_slice_new0 (NiceSocket); NiceSocket *sock;
TcpPriv *priv; TcpPriv *priv;
if (addr == NULL) { if (addr == NULL) {
...@@ -99,6 +99,8 @@ nice_tcp_bsd_socket_new (NiceAgent *agent, GMainContext *ctx, NiceAddress *addr) ...@@ -99,6 +99,8 @@ nice_tcp_bsd_socket_new (NiceAgent *agent, GMainContext *ctx, NiceAddress *addr)
return NULL; return NULL;
} }
sock = g_slice_new0 (NiceSocket);
nice_address_copy_to_sockaddr(addr, (struct sockaddr *)&name); nice_address_copy_to_sockaddr(addr, (struct sockaddr *)&name);
if (sockfd == -1) { if (sockfd == -1) {
......
...@@ -73,10 +73,6 @@ nice_udp_bsd_socket_new (NiceAddress *addr) ...@@ -73,10 +73,6 @@ nice_udp_bsd_socket_new (NiceAddress *addr)
socklen_t name_len = sizeof (name); socklen_t name_len = sizeof (name);
NiceSocket *sock = g_slice_new0 (NiceSocket); NiceSocket *sock = g_slice_new0 (NiceSocket);
if (!sock) {
return NULL;
}
if (addr != NULL) { if (addr != NULL) {
nice_address_copy_to_sockaddr(addr, (struct sockaddr *)&name); nice_address_copy_to_sockaddr(addr, (struct sockaddr *)&name);
} else { } else {
......
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