summaryrefslogtreecommitdiff
path: root/socket/udp-turn.c
diff options
context:
space:
mode:
Diffstat (limited to 'socket/udp-turn.c')
-rw-r--r--socket/udp-turn.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/socket/udp-turn.c b/socket/udp-turn.c
index 12f90a0..2e6618e 100644
--- a/socket/udp-turn.c
+++ b/socket/udp-turn.c
@@ -125,6 +125,7 @@ static gboolean socket_is_reliable (NiceSocket *sock);
static gboolean socket_can_send (NiceSocket *sock, NiceAddress *addr);
static void socket_set_writable_callback (NiceSocket *sock,
NiceSocketWritableCb callback, gpointer user_data);
+static gboolean socket_is_base_of (NiceSocket *sock, NiceSocket *other);
static void priv_process_pending_bindings (UdpTurnPriv *priv);
static gboolean priv_retransmissions_tick_unlocked (UdpTurnPriv *priv);
@@ -243,6 +244,7 @@ nice_udp_turn_socket_new (GMainContext *ctx, NiceAddress *addr,
sock->is_reliable = socket_is_reliable;
sock->can_send = socket_can_send;
sock->set_writable_callback = socket_set_writable_callback;
+ sock->is_base_of = socket_is_base_of;
sock->close = socket_close;
sock->priv = (void *) priv;
@@ -952,6 +954,14 @@ socket_set_writable_callback (NiceSocket *sock,
}
static gboolean
+socket_is_base_of (NiceSocket *sock, NiceSocket *other)
+{
+ UdpTurnPriv *priv = other->priv;
+
+ return (sock == other) || nice_socket_is_base_of (sock, priv->base_socket);
+}
+
+static gboolean
priv_forget_send_request (gpointer pointer)
{
SendRequest *req = pointer;