dbus/test/glib test-dbus-glib.c,1.11,1.12

Havoc Pennington hp at freedesktop.org
Thu Feb 10 19:37:06 PST 2005


Update of /cvs/dbus/dbus/test/glib
In directory gabe:/tmp/cvs-serv15549/test/glib

Modified Files:
	test-dbus-glib.c 
Log Message:
2005-02-10  Havoc Pennington  <hp at 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



Index: test-dbus-glib.c
===================================================================
RCS file: /cvs/dbus/dbus/test/glib/test-dbus-glib.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- test-dbus-glib.c	30 Jan 2005 23:06:32 -0000	1.11
+++ test-dbus-glib.c	11 Feb 2005 03:37:03 -0000	1.12
@@ -16,35 +16,9 @@
 
 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 @@
 
   /* 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);



More information about the dbus-commit mailing list