diff options
author | Havoc Pennington <hp@redhat.com> | 2003-08-11 02:11:58 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-08-11 02:11:58 +0000 |
commit | b29ea9115ea3277354b7ccbe442026279220f4ac (patch) | |
tree | 19e8a5880d7c324a7da4e712fdd76262470a54fe /bus/connection.c | |
parent | cefb84edc5f84011c5a171e5d052e37c56c55d27 (diff) | |
download | dbus-b29ea9115ea3277354b7ccbe442026279220f4ac.tar.gz |
2003-08-10 Havoc Pennington <hp@pobox.com>
* tools/dbus-send.c (main): add --type argument, for now
supporting only method_call and signal types.
* tools/dbus-print-message.c: print message type
* dbus/dbus-connection.c (_dbus_connection_new_for_transport):
init connection->objects
* doc/dbus-specification.sgml: fix sgml
* bus/*.c: port over to object-instance API changes
* test/test-service.c: ditto
* dbus/dbus-message.c (dbus_message_create_header): allow #NULL
name, we will have to fix up the rest of the code to also handle
this
(dbus_message_new): generic message-creation call
(set_string_field): allow appending name field
Diffstat (limited to 'bus/connection.c')
-rw-r--r-- | bus/connection.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bus/connection.c b/bus/connection.c index 5121658d..e588039e 100644 --- a/bus/connection.c +++ b/bus/connection.c @@ -963,18 +963,18 @@ bus_connection_preallocate_oom_error (DBusConnection *connection) if (preallocated == NULL) return FALSE; - /* d->name may be NULL, but that is OK */ - message = dbus_message_new (DBUS_ERROR_NO_MEMORY, - d->name); + message = dbus_message_new (DBUS_MESSAGE_TYPE_ERROR); + if (message == NULL) { dbus_connection_free_preallocated_send (connection, preallocated); return FALSE; } - dbus_message_set_is_error (message, TRUE); - - if (!dbus_message_set_sender (message, + /* d->name may be NULL, but that is OK */ + if (!dbus_message_set_name (message, DBUS_ERROR_NO_MEMORY) || + !dbus_message_set_destination (message, d->name) || + !dbus_message_set_sender (message, DBUS_SERVICE_DBUS)) { dbus_connection_free_preallocated_send (connection, preallocated); @@ -1338,7 +1338,7 @@ bus_transaction_send (BusTransaction *transaction, DBusList *link; _dbus_verbose (" trying to add %s %s to transaction%s\n", - dbus_message_get_is_error (message) ? "error" : + dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_ERROR ? "error" : dbus_message_get_reply_serial (message) != 0 ? "reply" : "message", dbus_message_get_name (message), @@ -1554,9 +1554,9 @@ bus_transaction_send_error_reply (BusTransaction *transaction, _dbus_verbose ("Sending error reply %s \"%s\"\n", error->name, error->message); - reply = dbus_message_new_error_reply (in_reply_to, - error->name, - error->message); + reply = dbus_message_new_error (in_reply_to, + error->name, + error->message); if (reply == NULL) return FALSE; |