else
reply = (func) (bus, message, datum);
- if (!reply)
+ /* All D-Bus method calls must have a reply.
+ * If one is not provided presume that the caller has already
+ * sent one.
+ */
+ if (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);
}
- dbus_connection_send (bus, reply, NULL);
- dbus_message_unref (reply);
result = DBUS_HANDLER_RESULT_HANDLED;
}