Commit 3e6b351f authored by Simon McVittie's avatar Simon McVittie

Imported Upstream version 1.5.0

parent b03dfc9e
......@@ -154,6 +154,10 @@ To make a release of D-Bus, do the following:
- update the file NEWS based on the git history
- verify that the version number of dbus-specification.xml is
changed if it needs to be; if changes have been made, update the
release date in that file
- update the AUTHORS file with "make update-authors" if necessary
- the version number should have major.minor.micro, even
......@@ -175,7 +179,8 @@ To make a release of D-Bus, do the following:
- bump the version number up in configure.ac (so the micro version is odd),
and commit it. Make sure you do this *after* tagging the previous
release! The idea is that git has a newer version number
than anything released.
than anything released. Similarly, bump the version number of
dbus-specification.xml and set the release date to "(not finalized)".
- merge the branch you've released to the chronologically-later
branch (usually "master"). You'll probably have to fix a merge
......
D-Bus 1.5.0 (2011-04-11)
==
The "you never know when you need to tow something from your giant
flying shark" release.
• D-Bus Specification v0.16
· Add support for path_namespace and arg0namespace in match rules
(fd.o #24317, #34870; Will Thompson, David Zeuthen, Simon McVittie)
· Make argNpath support object paths, not just object-path-like strings,
and document it better (fd.o #31818, Will Thompson)
• Let the bus daemon implement more than one interface (fd.o #33757,
Simon McVittie)
• Optimize _dbus_string_replace_len to reduce waste (fd.o #21261,
Roberto Guido)
• Require user intervention to compile with missing 64-bit support
(fd.o #35114, Simon McVittie)
• Add dbus_type_is_valid as public API (fd.o #20496, Simon McVittie)
• Raise UnknownObject instead of UnknownMethod for calls to methods on
paths that are not part of the object tree, and UnknownInterface for calls
to unknown interfaces in the bus daemon (fd.o #34527, Lennart Poettering)
D-Bus 1.4.8 (2011-04-08)
==
......
......@@ -13,8 +13,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
[m4_warning([this file was generated for autoconf 2.67.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
......
......@@ -1644,11 +1644,7 @@ bus_driver_handle_get_id (DBusConnection *connection,
return FALSE;
}
/* For speed it might be useful to sort this in order of
* frequency of use (but doesn't matter with only a few items
* anyhow)
*/
static struct
typedef struct
{
const char *name;
const char *in_args;
......@@ -1657,7 +1653,13 @@ static struct
BusTransaction *transaction,
DBusMessage *message,
DBusError *error);
} message_handlers[] = {
} MessageHandler;
/* For speed it might be useful to sort this in order of
* frequency of use (but doesn't matter with only a few items
* anyhow)
*/
static const MessageHandler dbus_message_handlers[] = {
{ "Hello",
"",
DBUS_TYPE_STRING_AS_STRING,
......@@ -1729,7 +1731,41 @@ static struct
{ "GetId",
"",
DBUS_TYPE_STRING_AS_STRING,
bus_driver_handle_get_id }
bus_driver_handle_get_id },
{ NULL, NULL, NULL, NULL }
};
static dbus_bool_t bus_driver_handle_introspect (DBusConnection *,
BusTransaction *, DBusMessage *, DBusError *);
static const MessageHandler introspectable_message_handlers[] = {
{ "Introspect", "", DBUS_TYPE_STRING_AS_STRING, bus_driver_handle_introspect },
{ NULL, NULL, NULL, NULL }
};
typedef struct {
const char *name;
const MessageHandler *message_handlers;
const char *extra_introspection;
} InterfaceHandler;
/* These should ideally be sorted by frequency of use, although it
* probably doesn't matter with this few items */
static InterfaceHandler interface_handlers[] = {
{ DBUS_INTERFACE_DBUS, dbus_message_handlers,
" <signal name=\"NameOwnerChanged\">\n"
" <arg type=\"s\"/>\n"
" <arg type=\"s\"/>\n"
" <arg type=\"s\"/>\n"
" </signal>\n"
" <signal name=\"NameLost\">\n"
" <arg type=\"s\"/>\n"
" </signal>\n"
" <signal name=\"NameAcquired\">\n"
" <arg type=\"s\"/>\n"
" </signal>\n" },
{ DBUS_INTERFACE_INTROSPECTABLE, introspectable_message_handlers, NULL },
{ NULL, NULL, NULL }
};
static dbus_bool_t
......@@ -1770,86 +1806,43 @@ write_args_for_direction (DBusString *xml,
dbus_bool_t
bus_driver_generate_introspect_string (DBusString *xml)
{
int i;
const InterfaceHandler *ih;
const MessageHandler *mh;
if (!_dbus_string_append (xml, DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE))
return FALSE;
if (!_dbus_string_append (xml, "<node>\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " <interface name=\"%s\">\n", DBUS_INTERFACE_INTROSPECTABLE))
return FALSE;
if (!_dbus_string_append (xml, " <method name=\"Introspect\">\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " <arg name=\"data\" direction=\"out\" type=\"%s\"/>\n", DBUS_TYPE_STRING_AS_STRING))
return FALSE;
if (!_dbus_string_append (xml, " </method>\n"))
return FALSE;
if (!_dbus_string_append (xml, " </interface>\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " <interface name=\"%s\">\n",
DBUS_INTERFACE_DBUS))
return FALSE;
i = 0;
while (i < _DBUS_N_ELEMENTS (message_handlers))
for (ih = interface_handlers; ih->name != NULL; ih++)
{
if (!_dbus_string_append_printf (xml, " <method name=\"%s\">\n",
message_handlers[i].name))
if (!_dbus_string_append_printf (xml, " <interface name=\"%s\">\n",
ih->name))
return FALSE;
if (!write_args_for_direction (xml, message_handlers[i].in_args, TRUE))
return FALSE;
if (!write_args_for_direction (xml, message_handlers[i].out_args, FALSE))
return FALSE;
if (!_dbus_string_append (xml, " </method>\n"))
return FALSE;
++i;
}
if (!_dbus_string_append_printf (xml, " <signal name=\"NameOwnerChanged\">\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " </signal>\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " <signal name=\"NameLost\">\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n"))
return FALSE;
if (!_dbus_string_append_printf (xml, " </signal>\n"))
return FALSE;
for (mh = ih->message_handlers; mh->name != NULL; mh++)
{
if (!_dbus_string_append_printf (xml, " <method name=\"%s\">\n",
mh->name))
return FALSE;
if (!write_args_for_direction (xml, mh->in_args, TRUE))
return FALSE;
if (!_dbus_string_append_printf (xml, " <signal name=\"NameAcquired\">\n"))
return FALSE;
if (!write_args_for_direction (xml, mh->out_args, FALSE))
return FALSE;
if (!_dbus_string_append_printf (xml, " <arg type=\"s\"/>\n"))
return FALSE;
if (!_dbus_string_append (xml, " </method>\n"))
return FALSE;
}
if (!_dbus_string_append_printf (xml, " </signal>\n"))
return FALSE;
if (ih->extra_introspection != NULL &&
!_dbus_string_append (xml, ih->extra_introspection))
return FALSE;
if (!_dbus_string_append (xml, " </interface>\n"))
return FALSE;
if (!_dbus_string_append (xml, " </interface>\n"))
return FALSE;
}
if (!_dbus_string_append (xml, "</node>\n"))
return FALSE;
......@@ -1926,7 +1919,9 @@ bus_driver_handle_message (DBusConnection *connection,
DBusError *error)
{
const char *name, *sender, *interface;
int i;
const InterfaceHandler *ih;
const MessageHandler *mh;
dbus_bool_t found_interface = FALSE;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
......@@ -1944,57 +1939,50 @@ bus_driver_handle_message (DBusConnection *connection,
return TRUE; /* we just ignore this */
}
if (dbus_message_is_method_call (message,
DBUS_INTERFACE_INTROSPECTABLE,
"Introspect"))
return bus_driver_handle_introspect (connection, transaction, message, error);
/* may be NULL, which means "any interface will do" */
interface = dbus_message_get_interface (message);
if (interface == NULL)
interface = DBUS_INTERFACE_DBUS;
_dbus_assert (dbus_message_get_member (message) != NULL);
name = dbus_message_get_member (message);
sender = dbus_message_get_sender (message);
if (strcmp (interface,
DBUS_INTERFACE_DBUS) != 0)
{
_dbus_verbose ("Driver got message to unknown interface \"%s\"\n",
interface);
goto unknown;
}
_dbus_verbose ("Driver got a method call: %s\n",
dbus_message_get_member (message));
/* security checks should have kept this from getting here */
_dbus_assert (sender != NULL || strcmp (name, "Hello") == 0);
i = 0;
while (i < _DBUS_N_ELEMENTS (message_handlers))
for (ih = interface_handlers; ih->name != NULL; ih++)
{
if (strcmp (message_handlers[i].name, name) == 0)
if (interface != NULL && strcmp (interface, ih->name) != 0)
continue;
found_interface = TRUE;
for (mh = ih->message_handlers; mh->name != NULL; mh++)
{
if (strcmp (mh->name, name) != 0)
continue;
_dbus_verbose ("Found driver handler for %s\n", name);
if (!dbus_message_has_signature (message, message_handlers[i].in_args))
if (!dbus_message_has_signature (message, mh->in_args))
{
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
_dbus_verbose ("Call to %s has wrong args (%s, expected %s)\n",
name, dbus_message_get_signature (message),
message_handlers[i].in_args);
mh->in_args);
dbus_set_error (error, DBUS_ERROR_INVALID_ARGS,
"Call to %s has wrong args (%s, expected %s)\n",
name, dbus_message_get_signature (message),
message_handlers[i].in_args);
mh->in_args);
_DBUS_ASSERT_ERROR_IS_SET (error);
return FALSE;
}
if ((* message_handlers[i].handler) (connection, transaction, message, error))
if ((* mh->handler) (connection, transaction, message, error))
{
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
_dbus_verbose ("Driver handler succeeded\n");
......@@ -2007,15 +1995,13 @@ bus_driver_handle_message (DBusConnection *connection,
return FALSE;
}
}
++i;
}
unknown:
_dbus_verbose ("No driver handler for message \"%s\"\n",
name);
dbus_set_error (error, DBUS_ERROR_UNKNOWN_METHOD,
dbus_set_error (error, found_interface ? DBUS_ERROR_UNKNOWN_METHOD : DBUS_ERROR_UNKNOWN_INTERFACE,
"%s does not understand message %s",
DBUS_SERVICE_DBUS, name);
......
This diff is collapsed.
......@@ -31,13 +31,14 @@
typedef enum
{
BUS_MATCH_MESSAGE_TYPE = 1 << 0,
BUS_MATCH_INTERFACE = 1 << 1,
BUS_MATCH_MEMBER = 1 << 2,
BUS_MATCH_SENDER = 1 << 3,
BUS_MATCH_DESTINATION = 1 << 4,
BUS_MATCH_PATH = 1 << 5,
BUS_MATCH_ARGS = 1 << 6
BUS_MATCH_MESSAGE_TYPE = 1 << 0,
BUS_MATCH_INTERFACE = 1 << 1,
BUS_MATCH_MEMBER = 1 << 2,
BUS_MATCH_SENDER = 1 << 3,
BUS_MATCH_DESTINATION = 1 << 4,
BUS_MATCH_PATH = 1 << 5,
BUS_MATCH_ARGS = 1 << 6,
BUS_MATCH_PATH_NAMESPACE = 1 << 7
} BusMatchFlags;
BusMatchRule* bus_match_rule_new (DBusConnection *matches_go_to);
......@@ -55,11 +56,13 @@ dbus_bool_t bus_match_rule_set_sender (BusMatchRule *rule,
dbus_bool_t bus_match_rule_set_destination (BusMatchRule *rule,
const char *destination);
dbus_bool_t bus_match_rule_set_path (BusMatchRule *rule,
const char *path);
const char *path,
dbus_bool_t is_namespace);
dbus_bool_t bus_match_rule_set_arg (BusMatchRule *rule,
int arg,
const DBusString *value,
dbus_bool_t is_path);
dbus_bool_t is_path,
dbus_bool_t is_namespace);
BusMatchRule* bus_match_rule_parse (DBusConnection *matches_go_to,
const DBusString *rule_text,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,8 +2,8 @@ dnl -*- mode: m4 -*-
AC_PREREQ([2.63])
m4_define([dbus_major_version], [1])
m4_define([dbus_minor_version], [4])
m4_define([dbus_micro_version], [8])
m4_define([dbus_minor_version], [5])
m4_define([dbus_micro_version], [0])
m4_define([dbus_version],
[dbus_major_version.dbus_minor_version.dbus_micro_version])
AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus])
......@@ -32,16 +32,16 @@ AC_DEFINE_UNQUOTED(DBUS_DAEMON_NAME,"dbus-daemon",[Name of executable])
#
## increment if the interface has additions, changes, removals.
LT_CURRENT=8
LT_CURRENT=9
## increment any time the source changes; set to
## 0 if you increment CURRENT
LT_REVISION=5
LT_REVISION=0
## increment if any interfaces have been added; set to 0
## if any interfaces have been changed or removed. removal has
## precedence over adding, so set to 0 if both happened.
LT_AGE=5
LT_AGE=6
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
......@@ -228,6 +228,12 @@ AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(__int64)
AC_ARG_WITH([64-bit],
[AS_HELP_STRING([--without-64-bit],
[If you have to use this option, please report it as a bug])],
[],
[with_64_bit=yes])
### See what our 64 bit type is called
AC_MSG_CHECKING([64-bit integer type])
......@@ -265,13 +271,32 @@ $ac_cv_sizeof___int64)
;;
esac
if test -z "$dbusint64" ; then
AS_IF(
[test "x$with_64_bit" = xno],
[
DBUS_INT64_TYPE="no_int64_type_detected"
DBUS_HAVE_INT64=0
DBUS_INT64_CONSTANT=
DBUS_UINT64_CONSTANT=
AC_MSG_RESULT([none found])
else
AC_MSG_RESULT([disabled via --without-64-bit])
],
dnl else if
[test -z "$dbusint64"],
[AC_MSG_RESULT([not found])
AC_MSG_ERROR([Could not find a 64-bit integer type.
Please report a bug here with details of your platform and compiler:
http://bugs.freedesktop.org/enter_bug.cgi?product=DBus&component=core
To compile D-Bus with all 64-bit integer types removed (not recommended), use
the option "--without-64-bit".
This option is likely to be removed in future, unless you report that your
platform needs it.])
],
dnl else
[
DBUS_INT64_TYPE="$dbusint64"
DBUS_HAVE_INT64=1
DBUS_INT64_CONSTANT="$dbusint64_constant"
......@@ -280,7 +305,7 @@ else
AC_DEFINE_UNQUOTED(DBUS_INT64_PRINTF_MODIFIER, [$dbusint64_printf_modifier], [Define to printf modifier for 64 bit integer type])
fi
AC_MSG_RESULT($DBUS_INT64_TYPE)
fi
])
AC_SUBST(DBUS_INT64_TYPE)
AC_SUBST(DBUS_INT64_CONSTANT)
......@@ -1745,3 +1770,16 @@ if test x$dbus_use_libxml = xtrue; then
echo
echo "WARNING: You have chosen to use libxml as your xml parser however this code path is not maintained by the D-Bus developers and if it breaks you get to keep the pieces. If you have selected this option in err please reconfigure with expat (e.g. --with-xml=expat)."
fi
if test "x$DBUS_HAVE_INT64" = x0; then
AC_MSG_WARN([You have disabled 64-bit integers via --without-64-bit.
This removes parts of the standard D-Bus API and ABI (the 't' and 'x'
typecodes, the dbus_int64_t and dbus_uint64_t types, etc.) and should only be
used if your compiler lacks support for 64-bit integers. Please report a bug
with details of your platform and compiler.
This option is likely to be removed in future, unless the D-Bus developers
receive reports that it is still needed.
])
fi
......@@ -38,6 +38,7 @@
#include "dbus-protocol.h"
#include "dbus-dataslot.h"
#include "dbus-string.h"
#include "dbus-signature.h"
#include "dbus-pending-call.h"
#include "dbus-object-tree.h"
#include "dbus-threads-internal.h"
......@@ -3095,7 +3096,7 @@ dbus_connection_can_send_type(DBusConnection *connection,
{
_dbus_return_val_if_fail (connection != NULL, FALSE);
if (!_dbus_type_is_valid(type))
if (!dbus_type_is_valid (type))
return FALSE;
if (type != DBUS_TYPE_UNIX_FD)
......@@ -4522,6 +4523,7 @@ dbus_connection_dispatch (DBusConnection *connection)
DBusPendingCall *pending;
dbus_int32_t reply_serial;
DBusDispatchStatus status;
dbus_bool_t found_object;
_dbus_return_val_if_fail (connection != NULL, DBUS_DISPATCH_COMPLETE);
......@@ -4686,7 +4688,8 @@ dbus_connection_dispatch (DBusConnection *connection)
HAVE_LOCK_CHECK (connection);
result = _dbus_object_tree_dispatch_and_unlock (connection->objects,
message);
message,
&found_object);
CONNECTION_LOCK (connection);
......@@ -4725,7 +4728,7 @@ dbus_connection_dispatch (DBusConnection *connection)
}
reply = dbus_message_new_error (message,
DBUS_ERROR_UNKNOWN_METHOD,
found_object ? DBUS_ERROR_UNKNOWN_METHOD : DBUS_ERROR_UNKNOWN_OBJECT,
_dbus_string_get_const_data (&str));
_dbus_string_free (&str);
......
......@@ -1231,44 +1231,6 @@ _dbus_type_get_alignment (int typecode)
}
}
/**
* Return #TRUE if the typecode is a valid typecode.
* #DBUS_TYPE_INVALID surprisingly enough is not considered valid, and
* random unknown bytes aren't either. This function is safe with
* untrusted data.
*
* @returns #TRUE if valid
*/
dbus_bool_t
_dbus_type_is_valid (int typecode)
{
switch (typecode)
{
case DBUS_TYPE_BYTE:
case DBUS_TYPE_BOOLEAN:
case DBUS_TYPE_INT16:
case DBUS_TYPE_UINT16:
case DBUS_TYPE_INT32:
case DBUS_TYPE_UINT32:
case DBUS_TYPE_INT64:
case DBUS_TYPE_UINT64:
case DBUS_TYPE_DOUBLE:
case DBUS_TYPE_STRING:
case DBUS_TYPE_OBJECT_PATH:
case DBUS_TYPE_SIGNATURE:
case DBUS_TYPE_ARRAY:
case DBUS_TYPE_STRUCT:
case DBUS_TYPE_DICT_ENTRY:
case DBUS_TYPE_VARIANT:
case DBUS_TYPE_UNIX_FD:
return TRUE;
default:
return FALSE;
}
}
/**
* Returns a string describing the given type.
*
......
......@@ -254,7 +254,6 @@ dbus_uint32_t _dbus_marshal_read_uint32 (const DBusString *str,
int pos,
int byte_order,
int *new_pos);
dbus_bool_t _dbus_type_is_valid (int typecode);
int _dbus_type_get_alignment (int typecode);
dbus_bool_t _dbus_type_is_fixed (int typecode);
int _dbus_type_get_alignment (int typecode);
......
......@@ -250,7 +250,7 @@ _dbus_validate_signature_with_reason (const DBusString *type_str,
if (last == DBUS_DICT_ENTRY_BEGIN_CHAR)
{
if (!(_dbus_type_is_valid (*p) && dbus_type_is_basic (*p)))
if (!(dbus_type_is_valid (*p) && dbus_type_is_basic (*p)))
{
result = DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE;
goto out;
......@@ -393,7 +393,7 @@ validate_body_helper (DBusTypeReader *reader,
{
int array_elem_type = _dbus_type_reader_get_element_type (reader);
if (!_dbus_type_is_valid (array_elem_type))
if (!dbus_type_is_valid (array_elem_type))
{
return DBUS_INVALID_UNKNOWN_TYPECODE;
}
......@@ -1082,23 +1082,11 @@ _dbus_validate_error_name (const DBusString *str,
((c) >= 'a' && (c) <= 'z') || \
((c) == '_') || ((c) == '-'))
/**
* Checks that the given range of the string is a valid bus name in
* the D-Bus protocol. This includes a length restriction, etc., see
* the specification.
*
* @todo this is inconsistent with most of DBusString in that
* it allows a start,len range that extends past the string end.
*
* @param str the string
* @param start first byte index to check
* @param len number of bytes to check
* @returns #TRUE if the byte range exists and is a valid name
*/
dbus_bool_t
_dbus_validate_bus_name (const DBusString *str,
int start,
int len)
static dbus_bool_t
_dbus_validate_bus_name_full (const DBusString *str,
int start,
int len,
dbus_bool_t is_namespace)
{
const unsigned char *s;
const unsigned char *end;
......@@ -1176,12 +1164,54 @@ _dbus_validate_bus_name (const DBusString *str,
++s;
}
if (_DBUS_UNLIKELY (last_dot == NULL))
if (!is_namespace && _DBUS_UNLIKELY (last_dot == NULL))
return FALSE;
return TRUE;
}
/**
* Checks that the given range of the string is a valid bus name in
* the D-Bus protocol. This includes a length restriction, etc., see
* the specification.
*
* @todo this is inconsistent with most of DBusString in that
* it allows a start,len range that extends past the string end.
*
* @param str the string
* @param start first byte index to check
* @param len number of bytes to check
* @returns #TRUE if the byte range exists and is a valid name
*/
dbus_bool_t
_dbus_validate_bus_name (const DBusString *str,
int start,
int len)
{
return _dbus_validate_bus_name_full (str, start, len, FALSE);
}
/**
* Checks that the given range of the string is a prefix of a valid bus name in
* the D-Bus protocol. Unlike _dbus_validate_bus_name(), this accepts strings
* with only one period-separated component.
*
* @todo this is inconsistent with most of DBusString in that
* it allows a start,len range that extends past the string end.
*
* @param str the string
* @param start first byte index to check
* @param len number of bytes to check
* @returns #TRUE if the byte range exists and is a valid name
*/
dbus_bool_t
_dbus_validate_bus_namespace (const DBusString *str,
int start,
int len)
{
return _dbus_validate_bus_name_full (str, start, len, TRUE);
}
/**
* Checks that the given range of the string is a valid message type
* signature in the D-Bus protocol.
......
......@@ -144,6 +144,9 @@ dbus_bool_t _dbus_validate_error_name (const DBusString *str,
dbus_bool_t _dbus_validate_bus_name (const DBusString *str,
int start,
int len);
dbus_bool_t _dbus_validate_bus_namespace (const DBusString *str,
int start,
int len);
dbus_bool_t _dbus_validate_signature (const DBusString *str,
int start,
int len);
......
......@@ -27,6 +27,7 @@
#ifdef DBUS_BUILD_TESTS
#include "dbus-message-factory.h"
#include "dbus-message-private.h"
#include "dbus-signature.h"
#include "dbus-test.h"
#include <stdio.h>
......@@ -978,7 +979,7 @@ find_next_typecode (DBusMessageDataIter *iter,
_dbus_assert (byte_seq < _dbus_string_get_length (data));
if (_dbus_type_is_valid (_dbus_string_get_byte (data, byte_seq)))
if (dbus_type_is_valid (_dbus_string_get_byte (data, byte_seq)))
break;
else
iter_next (iter);
......
......@@ -745,7 +745,8 @@ handle_default_introspect_and_unlock (DBusObjectTree *tree,
*/
DBusHandlerResult
_dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree,
DBusMessage *message)
DBusMessage *message,
dbus_bool_t *found_object)
{
char **path;
dbus_bool_t exact_match;
......@@ -791,6 +792,9 @@ _dbus_object_tree_dispatch_and_unlock (DBusObjectTree *tree,
/* Find the deepest path that covers the path in the message */
subtree = find_handler (tree, (const char**) path, &exact_match);
if (found_object)
*found_object = !!subtree;
/* Build a list of all paths that cover the path in the message */
list = NULL;
......@@ -1382,7 +1386,7 @@ do_test_dispatch (DBusObjectTree *tree,
++j;
}
result = _dbus_object_tree_dispatch_and_unlock (tree, message);
result = _dbus_object_tree_dispatch_and_unlock (tree, message, NULL);
if (result == DBUS_HANDLER_RESULT_NEED_MEMORY)
goto oom;
......
......@@ -42,7 +42,8 @@ dbus_bool_t _dbus_object_tree_register (DBusObjectTree
void _dbus_object_tree_unregister_and_unlock (DBusObjectTree *tree,