diff options
author | Colin Walters <walters@verbum.org> | 2005-06-13 15:36:31 +0000 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2005-06-13 15:36:31 +0000 |
commit | 9548df2ce95cee1942f615b6f2abf0029e680f5a (patch) | |
tree | 2c8bc5649df4ab3d6269f3ff8f45fef85e75b876 /glib/dbus-gobject.c | |
parent | b539abf9ce1bdc5c55a15ec6670dfe176e2c55ba (diff) |
2005-06-13 Ross Burton <ross@burtonini.com>.
* glib/dbus-gobject.c: Handle errors on message
demarshalling by sending error message back.
* glib/dbus-gvalue.c: Initialize return variables.
Diffstat (limited to 'glib/dbus-gobject.c')
-rw-r--r-- | glib/dbus-gobject.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/glib/dbus-gobject.c b/glib/dbus-gobject.c index e2645f41..311f6b54 100644 --- a/glib/dbus-gobject.c +++ b/glib/dbus-gobject.c @@ -772,7 +772,8 @@ invoke_object_method (GObject *object, guint n_params; const GType *types; DBusGValueMarshalCtx context; - + GError *error = NULL; + context.gconnection = DBUS_G_CONNECTION_FROM_CONNECTION (connection); context.proxy = NULL; @@ -780,12 +781,16 @@ invoke_object_method (GObject *object, n_params = types_array->len; types = (const GType*) types_array->data; - value_array = dbus_gvalue_demarshal_message (&context, message, n_params, types, NULL); + value_array = dbus_gvalue_demarshal_message (&context, message, n_params, types, &error); if (value_array == NULL) { g_free (in_signature); g_array_free (types_array, TRUE); - return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + reply = dbus_message_new_error (message, "org.freedesktop.DBus.GLib.ErrorError", error->message); + dbus_connection_send (connection, reply, NULL); + dbus_message_unref (reply); + g_error_free (error); + return DBUS_HANDLER_RESULT_HANDLED; } g_array_free (types_array, TRUE); } |