~ubuntu-branches/ubuntu/lucid/gnome-power-manager/lucid-updates

« back to all changes in this revision

Viewing changes to debian/patches/10-proxy-by-name.patch

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2010-02-04 10:16:01 UTC
  • Revision ID: james.westby@ubuntu.com-20100204101601-wtpcdmxgpj33agkj
Tags: 2.29.1-0ubuntu3
* 10-proxy-by-name.patch: create a new proxy by name, and not by name
  owner. Also, don't try to reconnect in the callback. This prevents
  screen locking failure when gnome-screensaver now gets respawned by
  D-Bus.
* 11-add-error-logging.patch: add an error message to help debugging
  when we hit the timeout while waiting for gnome-screensaver.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: create a new proxy by name, and not by name
 
2
 owner.  Also, don't try to reconnect in the callback. This prevents
 
3
 screen locking failure when gnome-screensaver gets respawned by D-Bus.
 
4
Author: Marc Deslauriers <marc.deslauriers@ubuntu.com>
 
5
 
 
6
diff -Nur gnome-power-manager-2.29.1/src/egg-dbus-proxy.c gnome-power-manager-2.29.1.new/src/egg-dbus-proxy.c
 
7
--- gnome-power-manager-2.29.1/src/egg-dbus-proxy.c     2009-10-15 02:44:34.000000000 -0700
 
8
+++ gnome-power-manager-2.29.1.new/src/egg-dbus-proxy.c 2010-02-04 08:22:34.000000000 -0800
 
9
@@ -64,8 +64,6 @@
 
10
 static gboolean
 
11
 egg_dbus_proxy_connect (EggDbusProxy *proxy)
 
12
 {
 
13
-       GError *error = NULL;
 
14
-
 
15
        g_return_val_if_fail (EGG_IS_DBUS_PROXY (proxy), FALSE);
 
16
 
 
17
        /* are already connected? */
 
18
@@ -74,17 +72,10 @@
 
19
                return FALSE;
 
20
        }
 
21
 
 
22
-       proxy->priv->proxy = dbus_g_proxy_new_for_name_owner (proxy->priv->connection,
 
23
-                                                             proxy->priv->service,
 
24
-                                                             proxy->priv->path,
 
25
-                                                             proxy->priv->interface,
 
26
-                                                             &error);
 
27
-       /* check for any possible error */
 
28
-       if (error) {
 
29
-               egg_warning ("DBUS error: %s", error->message);
 
30
-               g_error_free (error);
 
31
-               proxy->priv->proxy = NULL;
 
32
-       }
 
33
+       proxy->priv->proxy = dbus_g_proxy_new_for_name (proxy->priv->connection,
 
34
+                                                       proxy->priv->service,
 
35
+                                                       proxy->priv->path,
 
36
+                                                       proxy->priv->interface);
 
37
 
 
38
        /* shouldn't be, but make sure proxy valid */
 
39
        if (proxy->priv->proxy == NULL) {
 
40
@@ -135,12 +126,6 @@
 
41
 dbus_monitor_connection_cb (EggDbusMonitor *monitor, gboolean status, EggDbusProxy *proxy)
 
42
 {
 
43
        g_return_if_fail (EGG_IS_DBUS_PROXY (proxy));
 
44
-       if (proxy->priv->assigned == FALSE)
 
45
-               return;
 
46
-       if (status)
 
47
-               egg_dbus_proxy_connect (proxy);
 
48
-       else
 
49
-               egg_dbus_proxy_disconnect (proxy);
 
50
 }
 
51
 
 
52
 /**