diff options
author | Havoc Pennington <hp@redhat.com> | 2005-02-11 03:37:03 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2005-02-11 03:37:03 +0000 |
commit | aa4f823781185fb18187714798795d7e4b0c9b65 (patch) | |
tree | e7f96d71925b867b85975f250616ba756c83ed6c /test | |
parent | 71f3b461b371d6bf7c7bc4e92578420b78d5c0d8 (diff) |
2005-02-10 Havoc Pennington <hp@redhat.com>
* test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
(call dbus_g_proxy_add_signal)
* dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
escape the hostname
(_dbus_server_new_for_domain_socket): escape the path
* dbus/dbus-address.c (dbus_address_escape_value): new
(dbus_address_unescape_value): new
(dbus_parse_address): unescape values
* dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
* doc/dbus-specification.xml: explain how to escape values in
addresses
Diffstat (limited to 'test')
-rw-r--r-- | test/glib/test-dbus-glib.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/test/glib/test-dbus-glib.c b/test/glib/test-dbus-glib.c index 5f565a0a..cee9316b 100644 --- a/test/glib/test-dbus-glib.c +++ b/test/glib/test-dbus-glib.c @@ -16,35 +16,9 @@ timed_exit (gpointer loop) static void foo_signal_handler (DBusGProxy *proxy, + double d, void *user_data) { -#if 0 - double d; - - /* FIXME - need to fix up dbus_gproxy_signal_connect() to be able to - * get signal args - */ - - DBusError derror; - - if (!dbus_message_is_signal (signal, - "org.freedesktop.TestSuite", - "Foo")) - { - g_printerr ("Signal handler received the wrong message\n"); - exit (1); - } - - dbus_error_init (&derror); - if (!dbus_message_get_args (signal, &derror, DBUS_TYPE_DOUBLE, - &d, DBUS_TYPE_INVALID)) - { - g_printerr ("failed to get signal args: %s\n", derror.message); - dbus_error_free (&derror); - exit (1); - } -#endif - n_times_foo_received += 1; g_main_loop_quit (loop); @@ -225,6 +199,8 @@ main (int argc, char **argv) /* Test oneway call and signal handling */ + dbus_g_proxy_add_signal (proxy, "Foo", DBUS_TYPE_DOUBLE_AS_STRING); + dbus_g_proxy_connect_signal (proxy, "Foo", G_CALLBACK (foo_signal_handler), NULL, NULL); |