hal/hald hald_dbus.c,1.40,1.41
David Zeuthen
david at freedesktop.org
Thu Sep 1 11:55:08 PDT 2005
Update of /cvs/hal/hal/hald
In directory gabe:/tmp/cvs-serv18449/hald
Modified Files:
hald_dbus.c
Log Message:
2005-09-01 David Zeuthen <davidz at redhat.com>
* hald/hald_dbus.c (hald_exec_method_cb): Fix up a bug where the
script for a method call returns garbage and we pass that to
dbus_message_new_error which then fails.
Index: hald_dbus.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald_dbus.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- hald_dbus.c 29 Jul 2005 20:32:57 -0000 1.40
+++ hald_dbus.c 1 Sep 2005 18:55:06 -0000 1.41
@@ -2531,8 +2531,13 @@
/* throw exception */
reply = dbus_message_new_error (message, exp_name, exp_detail);
- if (reply == NULL)
- DIE (("No memory"));
+ if (reply == NULL) {
+ /* error name may be invalid - assume caller fucked up and use a generic HAL error name */
+ reply = dbus_message_new_error (message, "org.freedesktop.Hal.Device.UnknownError", "An unknown error occured");
+ if (reply == NULL) {
+ DIE (("No memory"));
+ }
+ }
if (dbus_connection != NULL) {
if (!dbus_connection_send (dbus_connection, reply, NULL))
DIE (("No memory"));
More information about the hal-commit
mailing list