[libsoup/hsts: 36/38] Hook the default interface's functions
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/hsts: 36/38] Hook the default interface's functions
- Date: Wed, 13 Feb 2019 10:09:00 +0000 (UTC)
commit 2adaba1dba1ad6f8df4bada352e8e2e1a438635e
Author: Claudio Saavedra <csaavedra igalia com>
Date: Tue Sep 25 10:52:05 2018 +0300
Hook the default interface's functions
libsoup/soup-hsts-enforcer.c | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/libsoup/soup-hsts-enforcer.c b/libsoup/soup-hsts-enforcer.c
index 8a4dd6e8..34b2102e 100644
--- a/libsoup/soup-hsts-enforcer.c
+++ b/libsoup/soup-hsts-enforcer.c
@@ -43,6 +43,7 @@
*
**/
+static SoupSessionFeatureInterface *soup_hsts_enforcer_default_feature_interface;
static void soup_hsts_enforcer_session_feature_init (SoupSessionFeatureInterface *feature_interface,
gpointer interface_data);
enum {
@@ -516,6 +517,9 @@ soup_hsts_enforcer_request_queued (SoupSessionFeature *feature,
{
g_signal_connect (msg, "restarted", G_CALLBACK (message_restarted_cb), feature);
preprocess_request (SOUP_HSTS_ENFORCER (feature), msg);
+
+ if (soup_hsts_enforcer_default_feature_interface->request_queued)
+ soup_hsts_enforcer_default_feature_interface->request_queued (feature, session, msg);
}
static void
@@ -525,12 +529,18 @@ soup_hsts_enforcer_request_unqueued (SoupSessionFeature *feature,
{
g_signal_handlers_disconnect_by_func (msg, message_restarted_cb, feature);
g_signal_handlers_disconnect_by_func (msg, got_sts_header_cb, feature);
+
+ if (soup_hsts_enforcer_default_feature_interface->request_queued)
+ soup_hsts_enforcer_default_feature_interface->request_unqueued (feature, session, msg);
}
static void
soup_hsts_enforcer_session_feature_init (SoupSessionFeatureInterface *feature_interface,
gpointer interface_data)
{
+ soup_hsts_enforcer_default_feature_interface =
+ g_type_default_interface_peek (SOUP_TYPE_SESSION_FEATURE);
+
feature_interface->request_queued = soup_hsts_enforcer_request_queued;
feature_interface->request_unqueued = soup_hsts_enforcer_request_unqueued;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]