[gnome-software: 17/21] rpm-ostree: Stop connecting to D-Bus manually
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 17/21] rpm-ostree: Stop connecting to D-Bus manually
- Date: Wed, 27 Apr 2022 10:41:23 +0000 (UTC)
commit 2172957df0b14e1aab5364a0e1639a50755ec281
Author: Philip Withnall <pwithnall endlessos org>
Date: Thu Mar 31 23:28:49 2022 +0100
rpm-ostree: Stop connecting to D-Bus manually
Instead use the D-Bus connection provided by `GsPlugin`.
Signed-off-by: Philip Withnall <pwithnall endlessos org>
Helps: #1694
plugins/rpm-ostree/gs-plugin-rpm-ostree.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
index 0d8e48d28..031349a2e 100644
--- a/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
+++ b/plugins/rpm-ostree/gs-plugin-rpm-ostree.c
@@ -22,6 +22,7 @@
#include <rpm/rpmts.h>
#include <rpmostree.h>
+#include "gs-plugin-private.h"
#include "gs-plugin-rpm-ostree.h"
#include "gs-rpmostree-generated.h"
@@ -228,12 +229,12 @@ gs_rpmostree_ref_proxies_locked (GsPluginRpmOstree *self,
if (self->sysroot_proxy == NULL) {
g_autoptr(GVariantBuilder) options_builder = NULL;
- self->sysroot_proxy = gs_rpmostree_sysroot_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
- G_DBUS_PROXY_FLAGS_NONE,
-
"org.projectatomic.rpmostree1",
-
"/org/projectatomic/rpmostree1/Sysroot",
- cancellable,
- error);
+ self->sysroot_proxy = gs_rpmostree_sysroot_proxy_new_sync
(gs_plugin_get_system_bus_connection (GS_PLUGIN (self)),
+ G_DBUS_PROXY_FLAGS_NONE,
+ "org.projectatomic.rpmostree1",
+
"/org/projectatomic/rpmostree1/Sysroot",
+ cancellable,
+ error);
if (self->sysroot_proxy == NULL) {
gs_rpmostree_error_convert (error);
return FALSE;
@@ -271,12 +272,12 @@ gs_rpmostree_ref_proxies_locked (GsPluginRpmOstree *self,
return FALSE;
}
- self->os_proxy = gs_rpmostree_os_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
- G_DBUS_PROXY_FLAGS_NONE,
- "org.projectatomic.rpmostree1",
- os_object_path,
- cancellable,
- error);
+ self->os_proxy = gs_rpmostree_os_proxy_new_sync (gs_plugin_get_system_bus_connection
(GS_PLUGIN (self)),
+ G_DBUS_PROXY_FLAGS_NONE,
+ "org.projectatomic.rpmostree1",
+ os_object_path,
+ cancellable,
+ error);
if (self->os_proxy == NULL) {
gs_rpmostree_error_convert (error);
g_clear_object (&self->sysroot_proxy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]