From faf6c6b4f3f9de44eb580e8ea38d2fca851ec471 Mon Sep 17 00:00:00 2001
From: Ondrej Holy <oholy@redhat.com>
Date: Wed, 26 Apr 2017 15:00:57 +0200
Subject: [PATCH 1/2] Revert "sharing: Fix function arguments"
This reverts commit 5b6b26eba58f5c3b8b5441f07f0af7a84af5cc52.
---
plugins/sharing/gsd-sharing-manager.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/plugins/sharing/gsd-sharing-manager.c b/plugins/sharing/gsd-sharing-manager.c
index cd637c44..0c38a916 100644
--- a/plugins/sharing/gsd-sharing-manager.c
+++ b/plugins/sharing/gsd-sharing-manager.c
@@ -124,6 +124,7 @@ handle_unit_cb (GObject *source_object,
static void
gsd_sharing_manager_handle_service (GsdSharingManager *manager,
const char *method,
+ GAsyncReadyCallback callback,
ServiceInfo *service)
{
char *service_file;
@@ -139,8 +140,8 @@ gsd_sharing_manager_handle_service (GsdSharingManager *manager,
G_DBUS_CALL_FLAGS_NONE,
-1,
manager->priv->cancellable,
- handle_unit_cb,
- (gpointer) method);
+ callback,
+ manager);
g_free (service_file);
}
@@ -153,7 +154,8 @@ gsd_sharing_manager_start_service (GsdSharingManager *manager,
/* We use StartUnit, not StartUnitReplace, since the latter would
* cancel any pending start we already have going from an
* earlier _start_service() call */
- gsd_sharing_manager_handle_service (manager, "StartUnit", service);
+ gsd_sharing_manager_handle_service (manager, "StartUnit",
+ handle_unit_cb, "start");
}
static void
@@ -162,7 +164,8 @@ gsd_sharing_manager_stop_service (GsdSharingManager *manager,
{
g_debug ("About to stop %s", service->name);
- gsd_sharing_manager_handle_service (manager, "StopUnit", service);
+ gsd_sharing_manager_handle_service (manager, "StopUnit",
+ handle_unit_cb, "stop");
}
#ifdef HAVE_NETWORK_MANAGER
--
2.12.2