author | Alan Coopersmith <Alan.Coopersmith@Sun.COM> |
Fri, 15 May 2009 09:36:46 -0700 | |
changeset 705 | 24ca414edbff |
parent 626 | b36e763afbee |
permissions | -rw-r--r-- |
705
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
1 |
From 1e816065e5ec3b9394dc1fa5815457a664e15fd9 Mon Sep 17 00:00:00 2001 |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
2 |
From: Alan Coopersmith <[email protected]> |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
3 |
Date: Fri, 8 May 2009 21:31:01 -0700 |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
4 |
Subject: [PATCH] Don't printf NULL pointers on HAL connection error |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
5 |
|
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
6 |
Fixes Solaris bug 6801386 Xorg core dumps on startup if hald not running |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
7 |
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6801386 |
626
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
8 |
|
705
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
9 |
Signed-off-by: Alan Coopersmith <[email protected]> |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
10 |
--- |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
11 |
config/hal.c | 9 ++++++--- |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
12 |
1 files changed, 6 insertions(+), 3 deletions(-) |
626
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
13 |
|
705
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
14 |
diff --git a/config/hal.c b/config/hal.c |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
15 |
index 36fa839..731d9b8 100644 |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
16 |
--- a/config/hal.c |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
17 |
+++ b/config/hal.c |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
18 |
@@ -493,12 +493,14 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info) |
626
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
19 |
} |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
20 |
if (!libhal_ctx_init(info->hal_ctx, &error)) { |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
21 |
LogMessage(X_ERROR, "config/hal: couldn't initialise context: %s (%s)\n", |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
22 |
- error.name, error.message); |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
23 |
+ error.name ? error.name : "unknown error", |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
24 |
+ error.message ? error.message : "null"); |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
25 |
goto out_ctx; |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
26 |
} |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
27 |
if (!libhal_device_property_watch_all(info->hal_ctx, &error)) { |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
28 |
LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n", |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
29 |
- error.name, error.message); |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
30 |
+ error.name ? error.name : "unknown error", |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
31 |
+ error.message ? error.message : "null"); |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
32 |
goto out_ctx2; |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
33 |
} |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
34 |
libhal_ctx_set_device_added(info->hal_ctx, device_added); |
705
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
35 |
@@ -518,7 +520,8 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info) |
626
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
36 |
out_ctx2: |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
37 |
if (!libhal_ctx_shutdown(info->hal_ctx, &error)) |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
38 |
LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n", |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
39 |
- error.name, error.message); |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
40 |
+ error.name ? error.name : "unknown error", |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
41 |
+ error.message ? error.message : "null"); |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
42 |
out_ctx: |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
43 |
libhal_ctx_free(info->hal_ctx); |
b36e763afbee
6801386 Xorg core dumps on startup if hald not running in snv_107
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
diff
changeset
|
44 |
out_err: |
705
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
45 |
-- |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
46 |
1.5.6.5 |
24ca414edbff
6826940 Xorg server 1.6.1, Mesa 7.4.1, and associated module upgrades [PSARC 2009/292]
Alan Coopersmith <Alan.Coopersmith@Sun.COM>
parents:
626
diff
changeset
|
47 |