[libsoup/hsts: 35/36] Hook the default interface's functions
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/hsts: 35/36] Hook the default interface's functions
- Date: Tue, 25 Sep 2018 14:57:47 +0000 (UTC)
commit a56696c55a04d31c5c59098e9025e440a990aa4a
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 ce8e45d7..b687ba43 100644
--- a/libsoup/soup-hsts-enforcer.c
+++ b/libsoup/soup-hsts-enforcer.c
@@ -47,6 +47,7 @@
*
**/
+static SoupSessionFeatureInterface *soup_hsts_enforcer_default_feature_interface;
static void soup_hsts_enforcer_session_feature_init (SoupSessionFeatureInterface *feature_interface,
gpointer interface_data);
enum {
@@ -520,6 +521,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
@@ -529,12 +533,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]