summaryrefslogtreecommitdiff
path: root/dbus
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-04-04 15:45:07 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-08-17 18:54:42 +0100
commit4ba637e2ae32b2daf224265c22cc8b43cf0a0bbf (patch)
tree8cb6f322a736bef7c6663a54dd172db31cba0f34 /dbus
parentcd7e9a1c6dd0eef6e867cac80339a38758d0cd6f (diff)
invoke_object_method, dbus_g_method_return_error: handle sending failure
I just made it fatal, since it's either programming error or OOM. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35767 Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus-gobject.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c
index fc6e247..39eed45 100644
--- a/dbus/dbus-gobject.c
+++ b/dbus/dbus-gobject.c
@@ -1892,7 +1892,9 @@ invoke_object_method (GObject *object,
if (reply)
{
- dbus_connection_send (connection, reply, NULL);
+ if (!dbus_connection_send (connection, reply, NULL))
+ g_error ("dbus_connection_send failed: out of memory?");
+
dbus_message_unref (reply);
}
@@ -3091,7 +3093,10 @@ dbus_g_method_return_error (DBusGMethodInvocation *context, const GError *error)
goto out;
reply = gerror_to_dbus_error_message (context->object, dbus_g_message_get_message (context->message), error);
- dbus_connection_send (dbus_g_connection_get_connection (context->connection), reply, NULL);
+ if (!dbus_connection_send (
+ dbus_g_connection_get_connection (context->connection), reply, NULL))
+ g_error ("dbus_connection_send failed: out of memory?");
+
dbus_message_unref (reply);
out: