Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 366842 Details for
Bug 496880
lxde-base/lxsession-0.4.9.2-r1 reboot,hibernate,shutdown dialogs do not work under logind
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Minimal patch from Mageia, tested with lxde-base/lxsession-0.4.9.2-r1 on amd64
lxsession-0.4.9.2-fix-logind-dbus-calls.patch (text/plain), 2.80 KB, created by
emil karlson
on 2014-01-03 13:12:19 UTC
(
hide
)
Description:
Minimal patch from Mageia, tested with lxde-base/lxsession-0.4.9.2-r1 on amd64
Filename:
MIME Type:
Creator:
emil karlson
Created:
2014-01-03 13:12:19 UTC
Size:
2.80 KB
patch
obsolete
>--- lxsession-0.4.9.2/lxsession-logout/dbus-interface.c.0000 2013-04-12 22:02:19.000000000 +0100 >+++ lxsession-0.4.9.2/lxsession-logout/dbus-interface.c 2013-11-05 11:00:34.038965063 +0000 >@@ -244,10 +244,11 @@ > return function_result; > } > >-static void >-logind_call_function (const gchar *function, gboolean value, GError **error) >+static char * >+logind_call_function (const gchar *function) > { > GVariant *result; >+ GError *err = NULL; > > if (!logind_proxy) > { >@@ -258,20 +259,28 @@ > "/org/freedesktop/login1", > "org.freedesktop.login1.Manager", > NULL, >- error); >+ &err); >+ if (err != NULL) >+ g_error_free(err); > if (!logind_proxy) >- return; >+ return NULL; > } > > result = g_dbus_proxy_call_sync (logind_proxy, > function, >- g_variant_new ("(b)", value), >+ g_variant_new ("(b)", TRUE), > G_DBUS_CALL_FLAGS_NONE, > -1, > NULL, >- error); >- g_variant_unref (result); >- return; >+ &err); >+ if (result) >+ g_variant_unref (result); >+ if (err != NULL) { >+ char *r = strdup(err->message); >+ g_error_free(err); >+ return r; >+ } >+ return NULL; > } > > gboolean >@@ -280,10 +289,10 @@ > return logind_query ("CanPowerOff", FALSE, NULL); > } > >-void >-dbus_logind_PowerOff (GError **error) >+char * >+dbus_logind_PowerOff (void) > { >- logind_call_function ("PowerOff", TRUE, error); >+ return logind_call_function ("PowerOff"); > } > > gboolean >@@ -292,10 +301,10 @@ > return logind_query ("CanReboot", FALSE, NULL); > } > >-void >-dbus_logind_Reboot (GError **error) >+char * >+dbus_logind_Reboot (void) > { >- logind_call_function ("Reboot", TRUE, error); >+ return logind_call_function ("Reboot"); > } > > gboolean >@@ -304,10 +313,10 @@ > return logind_query ("CanSuspend", FALSE, NULL); > } > >-void >-dbus_logind_Suspend (GError **error) >+char * >+dbus_logind_Suspend (void) > { >- logind_call_function ("Suspend", TRUE, error); >+ return logind_call_function ("Suspend"); > } > > gboolean >@@ -316,10 +325,10 @@ > return logind_query ("CanHibernate", FALSE, NULL); > } > >-void >-dbus_logind_Hibernate (GError **error) >+char * >+dbus_logind_Hibernate (void) > { >- logind_call_function ("Hibernate", TRUE, error); >+ return logind_call_function ("Hibernate"); > } > > /*** ConsoleKit mechanism ***/
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 496880
: 366842