forked from pool/xorg-x11-server
Accepting request 17483 from X11:XOrg
Copy from X11:XOrg/xorg-x11-server based on submit request 17483 from user sndirsch OBS-URL: https://build.opensuse.org/request/show/17483 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xorg-x11-server?expand=0&rev=136
This commit is contained in:
parent
f874ff78d2
commit
f136879b4e
86
commit-c941479.diff
Normal file
86
commit-c941479.diff
Normal file
@ -0,0 +1,86 @@
|
||||
commit c941479ecc2dead9c3deaee2620c9b9518c3da9a
|
||||
Author: Rémi Cardona <remi@gentoo.org>
|
||||
Date: Mon Jul 27 12:07:51 2009 +0200
|
||||
|
||||
config: add HAL error checks
|
||||
|
||||
This patch simplifies error handling in the HAL code and fixes a
|
||||
segfault if libhal_find_device_by_capability() failed.
|
||||
|
||||
Fixes http://bugs.gentoo.org/278760
|
||||
|
||||
Based on a patch by Martin von Gagern <Martin.vGagern@gmx.net>
|
||||
|
||||
Signed-off-by: Rémi Cardona <remi@gentoo.org>
|
||||
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||
(cherry picked from commit b1c3dc6ae226db178420e3b5f297b94afc87c94c)
|
||||
|
||||
diff --git a/config/hal.c b/config/hal.c
|
||||
index 731d9b8..59bff66 100644
|
||||
--- a/config/hal.c
|
||||
+++ b/config/hal.c
|
||||
@@ -474,13 +474,13 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
|
||||
char **devices;
|
||||
int num_devices, i;
|
||||
|
||||
+ if (info->hal_ctx)
|
||||
+ return TRUE; /* already registered, pretend we did something */
|
||||
+
|
||||
info->system_bus = connection;
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
- if (info->hal_ctx)
|
||||
- return TRUE; /* already registered, pretend we did something */
|
||||
-
|
||||
info->hal_ctx = libhal_ctx_new();
|
||||
if (!info->hal_ctx) {
|
||||
LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n");
|
||||
@@ -501,7 +501,7 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
|
||||
LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n",
|
||||
error.name ? error.name : "unknown error",
|
||||
error.message ? error.message : "null");
|
||||
- goto out_ctx2;
|
||||
+ goto out_ctx;
|
||||
}
|
||||
libhal_ctx_set_device_added(info->hal_ctx, device_added);
|
||||
libhal_ctx_set_device_removed(info->hal_ctx, device_removed);
|
||||
@@ -509,6 +509,12 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
|
||||
devices = libhal_find_device_by_capability(info->hal_ctx, "input",
|
||||
&num_devices, &error);
|
||||
/* FIXME: Get default devices if error is set. */
|
||||
+ if (dbus_error_is_set(&error)) {
|
||||
+ LogMessage(X_ERROR, "config/hal: couldn't find input device: %s (%s)\n",
|
||||
+ error.name ? error.name : "unknown error",
|
||||
+ error.message ? error.message : "null");
|
||||
+ goto out_ctx;
|
||||
+ }
|
||||
for (i = 0; i < num_devices; i++)
|
||||
device_added(info->hal_ctx, devices[i]);
|
||||
libhal_free_string_array(devices);
|
||||
@@ -517,13 +523,19 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info)
|
||||
|
||||
return TRUE;
|
||||
|
||||
-out_ctx2:
|
||||
- if (!libhal_ctx_shutdown(info->hal_ctx, &error))
|
||||
- LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
|
||||
- error.name ? error.name : "unknown error",
|
||||
- error.message ? error.message : "null");
|
||||
out_ctx:
|
||||
- libhal_ctx_free(info->hal_ctx);
|
||||
+ dbus_error_free(&error);
|
||||
+
|
||||
+ if (info->hal_ctx) {
|
||||
+ if (!libhal_ctx_shutdown(info->hal_ctx, &error)) {
|
||||
+ LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n",
|
||||
+ error.name ? error.name : "unknown error",
|
||||
+ error.message ? error.message : "null");
|
||||
+ dbus_error_free(&error);
|
||||
+ }
|
||||
+ libhal_ctx_free(info->hal_ctx);
|
||||
+ }
|
||||
+
|
||||
out_err:
|
||||
dbus_error_free(&error);
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 11 22:23:26 CEST 2009 - sndirsch@suse.de
|
||||
|
||||
- revert commit c941479 (bnc #528397)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 4 10:50:34 CEST 2009 - eich@suse.de
|
||||
|
||||
|
@ -33,7 +33,7 @@ BuildRequires: libjpeg-devel
|
||||
Url: http://xorg.freedesktop.org/
|
||||
%define EXPERIMENTAL 0
|
||||
Version: 7.4
|
||||
Release: 48
|
||||
Release: 49
|
||||
License: GPL v2 or later ; MIT License (or similar)
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Group: System/X11/Servers/XF86_4
|
||||
@ -116,6 +116,7 @@ Patch143: autoconfig_fallback_fbdev_first.diff
|
||||
Patch144: keyrelease-1.5.2.diff
|
||||
Patch145: driver-autoconfig.diff
|
||||
Patch147: truetype_fontpath.diff
|
||||
Patch148: commit-c941479.diff
|
||||
# Moblin
|
||||
Patch161: libdri_noPanoramiXExtension_symbol.patch
|
||||
Patch162: cache-xkbcomp-output-for-fast-start-up.patch
|
||||
@ -256,6 +257,8 @@ popd
|
||||
%patch144 -p1
|
||||
%patch145 -p0
|
||||
%patch147 -p0
|
||||
### Bug #528397
|
||||
%patch148 -p1 -R
|
||||
%patch161 -p1
|
||||
%patch162 -p1
|
||||
%if %moblin
|
||||
|
Loading…
Reference in New Issue
Block a user