xserver: Branch 'server-1.4-branch' - 4 commits

Daniel Stone daniels at kemper.freedesktop.org
Mon Oct 29 15:57:36 PDT 2007


 composite/compext.c |    6 ++++++
 config/dbus-core.c  |    3 ++-
 config/dbus.c       |   18 ++++++++++--------
 3 files changed, 18 insertions(+), 9 deletions(-)

New commits:
commit 881e4fb518c7ed4c95882368356901c1ec4b6abf
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Thu Sep 20 14:00:33 2007 -0700

    Set noCompositeExtension to TRUE when failing to initialize the extension (e.g. when Xinerama is enabled).
    (cherry picked from commit 50fa8722d35c12e5f0322cebe25faf99c39d4f50)

diff --git a/composite/compext.c b/composite/compext.c
index 944f8d8..ece51d0 100644
--- a/composite/compext.c
+++ b/composite/compext.c
@@ -674,6 +674,9 @@ CompositeExtensionInit (void)
     ExtensionEntry  *extEntry;
     int		    s;
 
+    /* Assume initialization is going to fail */
+    noCompositeExtension = TRUE;
+
     for (s = 0; s < screenInfo.numScreens; s++) {
 	ScreenPtr pScreen = screenInfo.screens[s];
 	VisualPtr vis;
@@ -731,4 +734,7 @@ CompositeExtensionInit (void)
 	    return;
     miRegisterRedirectBorderClipProc (compSetRedirectBorderClip,
 				      compGetRedirectBorderClip);
+
+    /* Initialization succeeded */
+    noCompositeExtension = FALSE;
 }
commit ce55565ecd0411065878fa7c9983606d53663b7c
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Thu Sep 20 16:22:24 2007 -0700

    Don't segfault on shutdown if we never managed to connect to dbus.
    (cherry picked from commit 3a965fdadccea7beff09a28c9c0ef4b4975eae38)

diff --git a/config/dbus-core.c b/config/dbus-core.c
index 2888159..eab72a5 100644
--- a/config/dbus-core.c
+++ b/config/dbus-core.c
@@ -87,7 +87,8 @@ teardown(void)
         dbus_connection_unref(bus_info.connection);
 
     RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, &bus_info);
-    RemoveGeneralSocket(bus_info.fd);
+    if (bus_info.fd != -1)
+        RemoveGeneralSocket(bus_info.fd);
     bus_info.fd = -1;
     bus_info.connection = NULL;
 
commit eba45539af33f7d312bcfee954786fe38ab8f391
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Thu Aug 30 18:22:12 2007 +0930

    config: Use [config/dbus] consistently for error messages.
    (cherry picked from commit 3f42af8c0ef1e5379bc836f589e0cbee43c02ac5)

diff --git a/config/dbus.c b/config/dbus.c
index d437994..c867512 100644
--- a/config/dbus.c
+++ b/config/dbus.c
@@ -139,7 +139,7 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
             MALFORMED_MESSAGE();
         options->value = xstrdup(tmp);
         if (!options->value) {
-            ErrorF("[config] couldn't duplicate option!\n");
+            ErrorF("[config/dbus] couldn't duplicate option!\n");
             ret = BadAlloc;
             goto unwind;
         }
@@ -204,7 +204,7 @@ remove_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
     dbus_message_iter_init_append(reply, &reply_iter);
 
     if (!dbus_message_iter_init(message, &iter)) {
-        ErrorF("[config] failed to init iterator\n");
+        ErrorF("[config/dbus] failed to init iterator\n");
         MALFORMED_MESSAGE();
     }
 
@@ -215,12 +215,12 @@ remove_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
 
     dev = LookupDeviceIntRec(deviceid);
     if (!dev) {
-        DebugF("[config] bogus device id %d given\n", deviceid);
+        DebugF("[config/dbus] bogus device id %d given\n", deviceid);
         ret = BadMatch;
         goto unwind;
     }
 
-    DebugF("[config] removing device %s (id %d)\n", dev->name, deviceid);
+    DebugF("[config/dbus] removing device %s (id %d)\n", dev->name, deviceid);
 
     /* Call PIE here so we don't try to dereference a device that's
      * already been removed. */
commit c0da35bda136ed423f2963bd5c75ad0301ac7845
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date:   Thu Aug 30 18:20:20 2007 +0930

    config: return BadValue to caller if add/remove doesn't have parameters.
    
    If message iterator cannot be created, the caller didn't supply any
    parameters. Return BadValue, instead of dying a horrible death while being
    stuck in an endless loop.
    (cherry picked from commit 0fcde83d94507eadd9f99d4e6a63584b221c989c)

diff --git a/config/dbus.c b/config/dbus.c
index c6f4af0..d437994 100644
--- a/config/dbus.c
+++ b/config/dbus.c
@@ -74,11 +74,12 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
     int ret, err;
     DeviceIntPtr dev = NULL;
 
+    dbus_message_iter_init_append(reply, &reply_iter);
+
     if (!dbus_message_iter_init(message, &iter)) {
         ErrorF("[config/dbus] couldn't initialise iterator\n");
-        return BadAlloc;
+        MALFORMED_MESSAGE();
     }
-    dbus_message_iter_init_append(reply, &reply_iter);
 
     options = xcalloc(sizeof(*options), 1);
     if (!options) {
@@ -200,11 +201,12 @@ remove_device(DBusMessage *message, DBusMessage *reply, DBusError *error)
     DeviceIntPtr dev;
     DBusMessageIter iter, reply_iter;
 
+    dbus_message_iter_init_append(reply, &reply_iter);
+
     if (!dbus_message_iter_init(message, &iter)) {
         ErrorF("[config] failed to init iterator\n");
-        return BadAlloc;
+        MALFORMED_MESSAGE();
     }
-    dbus_message_iter_init_append(reply, &reply_iter);
 
     if (!dbus_message_get_args(message, error, DBUS_TYPE_UINT32,
                                &deviceid, DBUS_TYPE_INVALID)) {


More information about the xorg-commit mailing list