Commit f752c30d authored by Youness Alaoui's avatar Youness Alaoui

Merge commit 'origin/nice-tester-2' into nice-kakaroto

parents 949754b1 feed9c21
...@@ -299,3 +299,16 @@ nice_address_is_private (const NiceAddress *a) ...@@ -299,3 +299,16 @@ nice_address_is_private (const NiceAddress *a)
g_assert_not_reached (); g_assert_not_reached ();
} }
NICEAPI_EXPORT gboolean
nice_address_is_valid (const NiceAddress *a)
{
switch (a->s.addr.sa_family)
{
case AF_INET:
case AF_INET6:
return TRUE;
default:
return FALSE;
}
}
...@@ -107,6 +107,10 @@ nice_address_to_string (const NiceAddress *addr, gchar *dst); ...@@ -107,6 +107,10 @@ nice_address_to_string (const NiceAddress *addr, gchar *dst);
gboolean gboolean
nice_address_is_private (const NiceAddress *a); nice_address_is_private (const NiceAddress *a);
G_GNUC_WARN_UNUSED_RESULT
gboolean
nice_address_is_valid (const NiceAddress *a);
G_END_DECLS G_END_DECLS
#endif /* _ADDRESS_H */ #endif /* _ADDRESS_H */
......
...@@ -299,6 +299,10 @@ gst_nice_src_dispose (GObject *object) ...@@ -299,6 +299,10 @@ gst_nice_src_dispose (GObject *object)
g_object_unref (src->agent); g_object_unref (src->agent);
src->agent = NULL; src->agent = NULL;
if (src->mainloop)
g_main_loop_unref (src->mainloop);
src->mainloop = NULL;
GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object)); GST_CALL_PARENT (G_OBJECT_CLASS, dispose, (object));
} }
......
...@@ -4,6 +4,7 @@ nice_address_equal ...@@ -4,6 +4,7 @@ nice_address_equal
nice_address_free nice_address_free
nice_address_get_port nice_address_get_port
nice_address_is_private nice_address_is_private
nice_address_is_valid
nice_address_new nice_address_new
nice_address_set_from_sockaddr nice_address_set_from_sockaddr
nice_address_set_from_string nice_address_set_from_string
......
...@@ -100,7 +100,7 @@ stun_conncheck_reply (uint8_t *restrict buf, size_t *restrict plen, ...@@ -100,7 +100,7 @@ stun_conncheck_reply (uint8_t *restrict buf, size_t *restrict plen,
return EINVAL; return EINVAL;
} }
if (!stun_demux (msg)) if (compat != 1 && !stun_demux (msg))
{ {
DBG (" Incorrectly multiplexed STUN message ignored.\n"); DBG (" Incorrectly multiplexed STUN message ignored.\n");
return EINVAL; return EINVAL;
......
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