Commit 194952e8 authored by Olivier Crête's avatar Olivier Crête

agent: Return an error instead of aborting if there was no host candidate

parent 93756ed6
...@@ -1662,7 +1662,7 @@ static void _upnp_error_mapping_port (GUPnPSimpleIgd *self, GError *error, ...@@ -1662,7 +1662,7 @@ static void _upnp_error_mapping_port (GUPnPSimpleIgd *self, GError *error,
#endif #endif
NICEAPI_EXPORT void NICEAPI_EXPORT gboolean
nice_agent_gather_candidates ( nice_agent_gather_candidates (
NiceAgent *agent, NiceAgent *agent,
guint stream_id) guint stream_id)
...@@ -1747,8 +1747,8 @@ nice_agent_gather_candidates ( ...@@ -1747,8 +1747,8 @@ nice_agent_gather_candidates (
n + 1, addr); n + 1, addr);
if (!host_candidate) { if (!host_candidate) {
g_error ("No host candidate??"); g_warning ("No host candidate??");
break; return FALSE;
} }
#ifdef HAVE_GUPNP #ifdef HAVE_GUPNP
...@@ -1809,6 +1809,8 @@ nice_agent_gather_candidates ( ...@@ -1809,6 +1809,8 @@ nice_agent_gather_candidates (
done: done:
agent_unlock(); agent_unlock();
return TRUE;
} }
static void priv_free_upnp (NiceAgent *agent) static void priv_free_upnp (NiceAgent *agent)
......
...@@ -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);
......
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