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,
#endif
NICEAPI_EXPORT void
NICEAPI_EXPORT gboolean
nice_agent_gather_candidates (
NiceAgent *agent,
guint stream_id)
......@@ -1747,8 +1747,8 @@ nice_agent_gather_candidates (
n + 1, addr);
if (!host_candidate) {
g_error ("No host candidate??");
break;
g_warning ("No host candidate??");
return FALSE;
}
#ifdef HAVE_GUPNP
......@@ -1809,6 +1809,8 @@ nice_agent_gather_candidates (
done:
agent_unlock();
return TRUE;
}
static void priv_free_upnp (NiceAgent *agent)
......
......@@ -385,6 +385,8 @@ gboolean nice_agent_set_relay_info(
* Start the candidate gathering process.
* 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()
<note>
<para>
......@@ -397,7 +399,7 @@ gboolean nice_agent_set_relay_info(
</para>
</note>
*/
void
gboolean
nice_agent_gather_candidates (
NiceAgent *agent,
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