Fix how UDisksClient filters property changes
This commit is contained in:
parent
d0e4accb53
commit
8077cb67a1
35
udisks-2.7.0-fix-changed-signal-filtering.patch
Normal file
35
udisks-2.7.0-fix-changed-signal-filtering.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From 192a17d1a89d098a8df7e8b6d1e23c1005597fd5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vratislav Podzimek <vpodzime@redhat.com>
|
||||||
|
Date: Fri, 16 Jun 2017 11:59:57 +0200
|
||||||
|
Subject: [PATCH] Fix how UDisksClient filters property changes
|
||||||
|
|
||||||
|
The value returned from g_strcmp0() is not a boolean. And a
|
||||||
|
GVariantIter has to be initialized before use.
|
||||||
|
---
|
||||||
|
udisks/udisksclient.c | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/udisks/udisksclient.c b/udisks/udisksclient.c
|
||||||
|
index ae9364d6..e2cd9a38 100644
|
||||||
|
--- a/udisks/udisksclient.c
|
||||||
|
+++ b/udisks/udisksclient.c
|
||||||
|
@@ -1566,14 +1566,15 @@ on_interface_proxy_properties_changed (GDBusObjectManagerClient *manager,
|
||||||
|
UDisksClient *client = UDISKS_CLIENT (user_data);
|
||||||
|
UDisksClientClass *client_class = UDISKS_CLIENT_GET_CLASS (client);
|
||||||
|
|
||||||
|
- GVariantIter *iter = NULL;
|
||||||
|
- const gchar *property_name = NULL;
|
||||||
|
+ GVariantIter iter;
|
||||||
|
+ gchar *property_name = NULL;
|
||||||
|
|
||||||
|
/* never emit the change signal for Job objects */
|
||||||
|
- if (g_strcmp0 (g_dbus_proxy_get_interface_name (interface_proxy), "org.freedesktop.UDisks2.Drive.Job"))
|
||||||
|
+ if (g_strcmp0 (g_dbus_proxy_get_interface_name (interface_proxy), "org.freedesktop.UDisks2.Drive.Job") == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- while (g_variant_iter_next (iter, "{&sv}", &property_name, NULL))
|
||||||
|
+ g_variant_iter_init (&iter, changed_properties);
|
||||||
|
+ while (g_variant_iter_next (&iter, "{&sv}", &property_name, NULL))
|
||||||
|
{
|
||||||
|
if (! g_hash_table_contains (client_class->changed_blacklist, property_name))
|
||||||
|
{
|
@ -16,11 +16,12 @@
|
|||||||
Name: udisks2
|
Name: udisks2
|
||||||
Summary: Disk Manager
|
Summary: Disk Manager
|
||||||
Version: 2.7.0
|
Version: 2.7.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: https://github.com/storaged-project/udisks
|
URL: https://github.com/storaged-project/udisks
|
||||||
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
|
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
|
||||||
|
Patch0: udisks-2.7.0-fix-changed-signal-filtering.patch
|
||||||
|
|
||||||
BuildRequires: glib2-devel >= %{glib2_version}
|
BuildRequires: glib2-devel >= %{glib2_version}
|
||||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||||
@ -201,6 +202,7 @@ This package contains module for ZRAM configuration.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n udisks-%{version}
|
%setup -q -n udisks-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -ivf
|
autoreconf -ivf
|
||||||
@ -343,6 +345,9 @@ udevadm trigger
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jun 19 2017 Vojtech Trefny <vtrefny@redhat.com> - 2.7.0-2
|
||||||
|
- Fix how UDisksClient filters property changes
|
||||||
|
|
||||||
* Fri Jun 02 2017 Vojtech Trefny <vtrefny@redhat.com> - 2.7.0-1
|
* Fri Jun 02 2017 Vojtech Trefny <vtrefny@redhat.com> - 2.7.0-1
|
||||||
- Version 2.7.0
|
- Version 2.7.0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user