[brasero] Fix Inhibit() d-bus parameters
- From: Luis Medinas <lmedinas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [brasero] Fix Inhibit() d-bus parameters
- Date: Wed, 8 Sep 2010 10:55:15 +0000 (UTC)
commit 2fb88b1fe58634368c2e0c924eca3aeee2667c54
Author: Robert Ancell <robert ancell canonical com>
Date: Wed Sep 8 18:27:02 2010 +1000
Fix Inhibit() d-bus parameters
libbrasero-burn/burn-dbus.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/libbrasero-burn/burn-dbus.c b/libbrasero-burn/burn-dbus.c
index 6908a05..a936ac0 100644
--- a/libbrasero-burn/burn-dbus.c
+++ b/libbrasero-burn/burn-dbus.c
@@ -91,6 +91,7 @@ brasero_inhibit_suspend (const char *reason)
guint cookie;
GError *error = NULL;
GVariant *res;
+ GVariantType *type;
g_return_val_if_fail (reason != NULL, -1);
@@ -103,22 +104,23 @@ brasero_inhibit_suspend (const char *reason)
return -1;
}
+ type = g_variant_type_new ("(u)");
res = g_dbus_connection_call_sync (conn,
GS_DBUS_SERVICE,
GS_DBUS_INHIBIT_PATH,
GS_DBUS_INHIBIT_INTERFACE,
"Inhibit",
- g_variant_new("(u^asms)",
+ g_variant_new("(susu)",
g_get_application_name (),
0,
reason,
- 1 | 4,
- &cookie),
- NULL,
+ 1 | 4),
+ type,
G_DBUS_CALL_FLAGS_NONE,
-1,
NULL,
&error);
+ g_variant_type_free (type);
if (res == NULL) {
g_warning ("Failed to inhibit the system from suspending: %s",
@@ -126,6 +128,9 @@ brasero_inhibit_suspend (const char *reason)
g_error_free (error);
cookie = -1;
}
+ else {
+ g_variant_get (res, "(u)", &cookie);
+ }
g_variant_unref (res);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]