summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-01-16 20:53:15 +1100
committerMatthew Waters <matthew@centricular.com>2018-02-01 23:25:18 +1100
commit94a7bf9ede14494ffdc73677eeb980a0cf2490e7 (patch)
tree60cc96efc3e8fd1add8bb67ead7429073c76aab8 /ext
parentc365ab7e667860ec654ebe94ed043be7233f3b63 (diff)
downloadgstreamer-plugins-bad-94a7bf9ede14494ffdc73677eeb980a0cf2490e7.tar.gz
dtls: remove reliance on a default GMainContext/Loop
By removing the indirection to the main loop completely when receiving the peer certificate. For reference, the on-decoder-key signal does not have a redirection.
Diffstat (limited to 'ext')
-rw-r--r--ext/dtls/gstdtlsdec.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/ext/dtls/gstdtlsdec.c b/ext/dtls/gstdtlsdec.c
index 3770de020..87b822131 100644
--- a/ext/dtls/gstdtlsdec.c
+++ b/ext/dtls/gstdtlsdec.c
@@ -434,30 +434,9 @@ on_key_received (GstDtlsConnection * connection, gpointer key, guint cipher,
}
static gboolean
-signal_peer_certificate_received (GWeakRef * ref)
-{
- GstDtlsDec *self;
-
- self = g_weak_ref_get (ref);
- g_weak_ref_clear (ref);
- g_free (ref);
- ref = NULL;
-
- if (self) {
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PEER_PEM]);
- g_object_unref (self);
- self = NULL;
- }
-
- return FALSE;
-}
-
-static gboolean
on_peer_certificate_received (GstDtlsConnection * connection, gchar * pem,
GstDtlsDec * self)
{
- GWeakRef *ref;
-
g_return_val_if_fail (GST_IS_DTLS_DEC (self), TRUE);
GST_DEBUG_OBJECT (self, "Received peer certificate PEM: \n%s", pem);
@@ -468,10 +447,7 @@ on_peer_certificate_received (GstDtlsConnection * connection, gchar * pem,
}
self->peer_pem = g_strdup (pem);
- ref = g_new (GWeakRef, 1);
- g_weak_ref_init (ref, self);
-
- g_idle_add ((GSourceFunc) signal_peer_certificate_received, ref);
+ g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PEER_PEM]);
return TRUE;
}