diff --git a/SOURCES/0008-ebackend-network-change-handler.patch b/SOURCES/0008-ebackend-network-change-handler.patch new file mode 100644 index 0000000..31424c4 --- /dev/null +++ b/SOURCES/0008-ebackend-network-change-handler.patch @@ -0,0 +1,66 @@ +From 9a3d7e63cbdc2703f18f70cb38d55a8741cb919d Mon Sep 17 00:00:00 2001 +Date: Mon, 3 Feb 2025 13:43:08 +0100 +Subject: [PATCH] EBackend: Change when adding signal handler for + "network-changed" + +The handler requires a valid ESource instance, otherwise there's printed +a runtime warning about failed assertion for "E_IS_SOURCE (source)" from +the e_source_unset_last_credentials_required_arguments() function. + +The signal can be (rarely) received between the class' init() and +constructed() methods, thus before the object's `source` property +is set, leading to this runtime warning. + +The fix is to listen for the "network-changed" signal only after +the constructed() function is called. It does not make much sense to do +it before that anyway. +--- + src/libebackend/e-backend.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/libebackend/e-backend.c b/src/libebackend/e-backend.c +index 0af7240536..7932c54866 100644 +--- a/src/libebackend/e-backend.c ++++ b/src/libebackend/e-backend.c +@@ -701,12 +701,18 @@ backend_constructed (GObject *object) + EBackend *backend; + ESource *source; + const gchar *extension_name; ++ gulong handler_id; + + backend = E_BACKEND (object); + + /* Chain up to parent's constructed() method. */ + G_OBJECT_CLASS (e_backend_parent_class)->constructed (object); + ++ handler_id = g_signal_connect ( ++ backend->priv->network_monitor, "network-changed", ++ G_CALLBACK (backend_network_changed_cb), backend); ++ backend->priv->network_changed_handler_id = handler_id; ++ + /* Get an initial GSocketConnectable from the data + * source's [Authentication] extension, if present. */ + source = e_backend_get_source (backend); +@@ -854,7 +860,6 @@ static void + e_backend_init (EBackend *backend) + { + GNetworkMonitor *network_monitor; +- gulong handler_id; + + backend->priv = e_backend_get_instance_private (backend); + backend->priv->prompter = e_user_prompter_new (); +@@ -874,11 +879,6 @@ e_backend_init (EBackend *backend) + network_monitor = e_network_monitor_get_default (); + backend->priv->network_monitor = g_object_ref (network_monitor); + backend->priv->online = g_network_monitor_get_network_available (network_monitor); +- +- handler_id = g_signal_connect ( +- backend->priv->network_monitor, "network-changed", +- G_CALLBACK (backend_network_changed_cb), backend); +- backend->priv->network_changed_handler_id = handler_id; + } + + /** +-- +GitLab + diff --git a/SPECS/evolution-data-server.spec b/SPECS/evolution-data-server.spec index 77540e8..aa0f263 100644 --- a/SPECS/evolution-data-server.spec +++ b/SPECS/evolution-data-server.spec @@ -54,7 +54,7 @@ Name: evolution-data-server Version: 3.40.4 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Backend data server for Evolution License: LGPLv2+ URL: https://wiki.gnome.org/Apps/Evolution @@ -67,6 +67,7 @@ Patch04: evolution-data-server-3.40.4-google-oauth2.patch Patch05: evolution-data-server-3.40.4-caldav-crash.patch Patch06: evolution-data-server-3.40.4-no-libedataserverui-in-alarm-notify.patch Patch07: 0007-oauth2-enable-html5-features.patch +Patch08: 0008-ebackend-network-change-handler.patch Provides: evolution-webcal = %{version} Obsoletes: evolution-webcal < 2.24.0 @@ -511,6 +512,9 @@ find $RPM_BUILD_ROOT -name '*.so.*' -exec chmod +x {} \; %{_datadir}/installed-tests %changelog +* Mon Feb 03 2025 Milan Crha - 3.40.4-10 +- Resolves: RHEL-72799 (EBackend: Change when adding signal handler for "network-changed") + * Thu Jan 11 2024 Milan Crha - 3.40.4-9 - Resolves: RHEL-21361 (OAuth2: Enable HTML5 database and local storage features for web view)