Hello Matthias,

Matthias Clasen [2010-08-17 22:03 -0400]:
> We're continuing to see problems with upower and polkit 0.97, so I've
> been looking at the upower code some more. I haven't found our issue
> yet, but I noticed that some of the dbus call have the misfeature of
> returning twice (or not at all).
> 
> I've also thrown in some memory leak fixes.

Thanks! I dissected your patch and applied it as three commits:

http://cgit.freedesktop.org/upower/commit/?id=1fc5aae71f474f82ba62c7a92be3aef05cc7ebef
http://cgit.freedesktop.org/upower/commit/?id=3967e062ef5a58c4f3f283f34d591c6e8a5d8788
http://cgit.freedesktop.org/upower/commit/?id=4a53c56a913b002d4f7e23b3379ccb134ed454db

> diff --git a/src/up-daemon.c b/src/up-daemon.c
> index 3fb952b..4884b64 100644
> --- a/src/up-daemon.c
> +++ b/src/up-daemon.c
> @@ -477,7 +480,7 @@ up_daemon_suspend (UpDaemon *daemon, 
> DBusGMethodInvocation *context)
>       if (subject == NULL)
>               goto out;
>  
> -     if (!up_polkit_check_auth (priv->polkit, subject, 
> "org.freedesktop.upower.suspend", context))
> +     if (!up_polkit_check_auth (priv->polkit, subject, 
> "org.freedesktop.upower.suspend", NULL))
>               goto out;
>  
>       /* already requested */

This is the hunk which I skipped. It looks like a regression to me
(you need the context in order to check whether the caller is
authorized), and might just be a debugging leftover?

Thanks,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devkit-devel mailing list
devkit-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/devkit-devel

Reply via email to