nautilus-cd-burner r2252 - in trunk: . src
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: nautilus-cd-burner r2252 - in trunk: . src
- Date: Tue, 16 Dec 2008 09:42:56 +0000 (UTC)
Author: hadess
Date: Tue Dec 16 09:42:56 2008
New Revision: 2252
URL: http://svn.gnome.org/viewvc/nautilus-cd-burner?rev=2252&view=rev
Log:
2008-12-16 Bastien Nocera <hadess hadess net>
* src/nautilus-burn-drive-monitor.c (monitor_hal_shutdown),
(monitor_hal_init): Patch from Wendy Hu <Huiwe Hu sun com>
to make sure the error is set before using it to print a warning
(Closes: #525719)
Modified:
trunk/ChangeLog
trunk/src/nautilus-burn-drive-monitor.c
Modified: trunk/src/nautilus-burn-drive-monitor.c
==============================================================================
--- trunk/src/nautilus-burn-drive-monitor.c (original)
+++ trunk/src/nautilus-burn-drive-monitor.c Tue Dec 16 09:42:56 2008
@@ -963,11 +963,15 @@
set_hal_monitor_enabled (monitor, FALSE);
dbus_error_init (&error);
- if (! libhal_ctx_shutdown (monitor->priv->ctx, &error)) {
- g_warning ("hal_shutdown failed: %s\n", error.message);
- dbus_error_free (&error);
- return;
- }
+ if (! libhal_ctx_shutdown (monitor->priv->ctx, &error)) {
+ if (dbus_error_is_set (&error)) {
+ g_warning ("hal_shutdown failed: %s\n", error.message);
+ dbus_error_free (&error);
+ } else {
+ g_warning ("failed to shutdown HAL!");
+ }
+ return;
+ }
#if USE_PRIVATE_DBUS_CONNECTION
dbus_connection_close (dbus_connection);
@@ -996,12 +1000,17 @@
return;
}
- if (! libhal_ctx_init (ctx, &error)) {
- g_warning ("hal_initialize failed: %s", error.message);
- dbus_error_free (&error);
- libhal_ctx_free (ctx);
- return;
- }
+ if (! libhal_ctx_init (ctx, &error)) {
+ if (dbus_error_is_set (&error)) {
+ g_warning ("hal_shutdown failed: %s", error.message);
+ dbus_error_free (&error);
+ } else {
+ g_warning ("failed to shuddown HAL!");
+ }
+
+ libhal_ctx_free (ctx);
+ return;
+ }
monitor->priv->ctx = ctx;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]