[libsoup/hsts: 18/20] Hook the default interface's functions
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/hsts: 18/20] Hook the default interface's functions
- Date: Fri, 17 May 2019 07:28:57 +0000 (UTC)
commit 7bafa2555ca6de434ece0152b44fa6b827d99b5a
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 f2fd4525..32e18b1b 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]