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 /test | |
parent | cefb84edc5f84011c5a171e5d052e37c56c55d27 (diff) |
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 'test')
-rw-r--r-- | test/decode-gcov.c | 4 | ||||
-rw-r--r-- | test/test-service.c | 16 |
2 files changed, 9 insertions, 11 deletions
diff --git a/test/decode-gcov.c b/test/decode-gcov.c index d13340e3..a7a4478b 100644 --- a/test/decode-gcov.c +++ b/test/decode-gcov.c @@ -38,6 +38,10 @@ #include <stdlib.h> #include <string.h> +#ifndef DBUS_HAVE_INT64 +#error "gcov support can't be built without 64-bit integer support" +#endif + static void die (const char *message) { diff --git a/test/test-service.c b/test/test-service.c index c2757acc..0771f33c 100644 --- a/test/test-service.c +++ b/test/test-service.c @@ -37,9 +37,9 @@ handle_echo (DBusConnection *connection, DBUS_TYPE_STRING, &s, DBUS_TYPE_INVALID)) { - reply = dbus_message_new_error_reply (message, - error.name, - error.message); + reply = dbus_message_new_error (message, + error.name, + error.message); if (reply == NULL) die ("No memory\n"); @@ -52,7 +52,7 @@ handle_echo (DBusConnection *connection, return DBUS_HANDLER_RESULT_ALLOW_MORE_HANDLERS; } - reply = dbus_message_new_reply (message); + reply = dbus_message_new_method_return (message); if (reply == NULL) die ("No memory\n"); @@ -99,11 +99,6 @@ main (int argc, DBusConnection *connection; DBusError error; DBusMessageHandler *handler; - const char *to_handle[] = { - "org.freedesktop.DBus.TestSuiteEcho", - "org.freedesktop.DBus.TestSuiteExit", - DBUS_MESSAGE_LOCAL_DISCONNECT, - }; int result; dbus_error_init (&error); @@ -127,8 +122,7 @@ main (int argc, if (handler == NULL) die ("No memory"); - if (!dbus_connection_register_handler (connection, handler, to_handle, - _DBUS_N_ELEMENTS (to_handle))) + if (!dbus_connection_add_filter (connection, handler)) die ("No memory"); result = dbus_bus_acquire_service (connection, "org.freedesktop.DBus.TestSuiteEchoService", |