summaryrefslogtreecommitdiff
path: root/droute
diff options
context:
space:
mode:
authorMark Doffman <mdoff@silver-wind.(none)>2009-04-15 20:33:15 +0100
committerMark Doffman <mdoff@silver-wind.(none)>2009-04-21 17:16:02 +0100
commite0f0a772ab239471f69ece3b99e7e7786953028d (patch)
treea56d989cfcd52f0ee5c43c575dce5c818576bdd4 /droute
parentc936744935bbd2a4d4ff7ea59d4b8dfafe8f157b (diff)
downloadat-spi2-atk-e0f0a772ab239471f69ece3b99e7e7786953028d.tar.gz
2009-04-15 Mark Doffman <mark.doffman@codethink.co.uk>
* droute/droute.c Despite what people may believe all D-Bus method calls must have a reply, whether the client side is waiting for one or not. This fixes droute so that it always sends a reply to method calls.
Diffstat (limited to 'droute')
-rw-r--r--droute/droute.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/droute/droute.c b/droute/droute.c
index 23365ef..212c280 100644
--- a/droute/droute.c
+++ b/droute/droute.c
@@ -479,7 +479,7 @@ handle_other (DBusConnection *bus,
StrPair pair;
DRouteFunction func;
- DBusMessage *reply;
+ DBusMessage *reply = NULL;
pair.one = iface;
pair.two = member;
@@ -493,11 +493,16 @@ handle_other (DBusConnection *bus,
reply = (func) (bus, message, datum);
- if (reply)
+ if (!reply)
{
- dbus_connection_send (bus, reply, NULL);
- dbus_message_unref (reply);
+ /* All D-Bus method calls must have a reply.
+ * If one is not provided presume that the call has a void
+ * return and no error has occured.
+ */
+ reply = dbus_message_new_method_return (message);
}
+ dbus_connection_send (bus, reply, NULL);
+ dbus_message_unref (reply);
result = DBUS_HANDLER_RESULT_HANDLED;
}
return result;