You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.3 KiB

From 12a9c6d06abcd8276612a982b98dbb757b0cd5d3 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Wed, 11 Oct 2017 18:10:40 +0200
Subject: [PATCH 2/3] 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 a90df9a6..26663442 100644
--- a/plugins/sharing/gsd-sharing-manager.c
+++ b/plugins/sharing/gsd-sharing-manager.c
@@ -128,6 +128,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;
@@ -143,8 +144,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);
}
@@ -157,7 +158,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
@@ -166,7 +168,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.13.5