summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--bus/bus.c4
-rw-r--r--bus/connection.c7
-rw-r--r--dbus/dbus-marshal.c2
-rw-r--r--dbus/dbus-message.c10
-rw-r--r--doc/TODO4
6 files changed, 28 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 029fa716..782a3f5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-10-22 Havoc Pennington <hp@redhat.com>
+
+ * bus/bus.c (bus_context_check_security_policy): fix up assertion
+
+ * bus/connection.c (bus_transaction_send_from_driver): set the
+ destination to the connection's base service
+
2003-10-20 Havoc Pennington <hp@redhat.com>
hmm, make check is currently not passing.
diff --git a/bus/bus.c b/bus/bus.c
index 43882c59..69359456 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -919,9 +919,9 @@ bus_context_check_security_policy (BusContext *context,
type = dbus_message_get_type (message);
/* dispatch.c was supposed to ensure these invariants */
- /* FIXME this assertion is failing in make check */
_dbus_assert (dbus_message_get_destination (message) != NULL ||
- type == DBUS_MESSAGE_TYPE_SIGNAL);
+ type == DBUS_MESSAGE_TYPE_SIGNAL ||
+ (sender == NULL && !bus_connection_is_active (proposed_recipient)));
_dbus_assert (type == DBUS_MESSAGE_TYPE_SIGNAL ||
addressed_recipient != NULL ||
strcmp (dbus_message_get_destination (message), DBUS_SERVICE_ORG_FREEDESKTOP_DBUS) == 0);
diff --git a/bus/connection.c b/bus/connection.c
index 65ebdb28..db9cbaa8 100644
--- a/bus/connection.c
+++ b/bus/connection.c
@@ -1862,6 +1862,13 @@ bus_transaction_send_from_driver (BusTransaction *transaction,
if (!dbus_message_set_sender (message, DBUS_SERVICE_ORG_FREEDESKTOP_DBUS))
return FALSE;
+ if (bus_connection_is_active (connection))
+ {
+ if (!dbus_message_set_destination (message,
+ bus_connection_get_name (connection)))
+ return FALSE;
+ }
+
/* bus driver never wants a reply */
dbus_message_set_no_reply (message, TRUE);
diff --git a/dbus/dbus-marshal.c b/dbus/dbus-marshal.c
index da7bbd4e..428e1fd2 100644
--- a/dbus/dbus-marshal.c
+++ b/dbus/dbus-marshal.c
@@ -1808,6 +1808,8 @@ _dbus_marshal_validate_type (const DBusString *str,
*end_pos = pos + 1;
return TRUE;
}
+
+ _dbus_verbose ("'%c' %d invalid type code\n", (int) *data, (int) *data);
return FALSE;
}
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c
index d3b1a3d0..ccd4a443 100644
--- a/dbus/dbus-message.c
+++ b/dbus/dbus-message.c
@@ -4907,13 +4907,15 @@ decode_header_data (const DBusString *data,
if (!_dbus_marshal_validate_type (data, pos, &type, &pos))
{
- _dbus_verbose ("Failed to validate type of named header field\n");
+ _dbus_verbose ("Failed to validate type of named header field pos = %d\n",
+ pos);
return FALSE;
}
if (!_dbus_marshal_validate_arg (data, byte_order, 0, type, -1, pos, &new_pos))
{
- _dbus_verbose ("Failed to validate argument to named header field\n");
+ _dbus_verbose ("Failed to validate argument to named header field pos = %d\n",
+ pos);
return FALSE;
}
@@ -5180,8 +5182,8 @@ load_one_message (DBusMessageLoader *loader,
message = NULL;
oom = FALSE;
-#if 0
- _dbus_verbose_bytes_of_string (&loader->data, 0, header_len + body_len);
+#if 1
+ _dbus_verbose_bytes_of_string (&loader->data, 0, header_len /* + body_len */);
#endif
if (!decode_header_data (&loader->data,
diff --git a/doc/TODO b/doc/TODO
index f9cb9db8..de77933a 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -122,3 +122,7 @@
- the auth protocol may as well use hex encoding instead of
base64, then we can dump the base64 implementation and
save some bloat.
+
+ - rename HEADER_FIELD_SERVICE -> HEADER_FIELD_DESTINATION
+ and HEADER_FIELD_SENDER_SERVICE -> HEADER_FIELD_SENDER
+ for both dbus-protocol.h and in the spec