dbus/test/glib test-dbus-glib.c,1.5,1.6

Olivier Andrieu oandrieu at pdx.freedesktop.org
Wed Apr 14 08:29:52 EST 2004


Update of /cvs/dbus/dbus/test/glib
In directory pdx:/tmp/cvs-serv25696/test/glib

Modified Files:
	test-dbus-glib.c 
Log Message:
2004-04-14  Olivier Andrieu  <oliv__a at users.sourceforge.net>

	* test/glib/test-dbus-glib.c (timed_exit): fail the test after
	a few seconds.


Index: test-dbus-glib.c
===================================================================
RCS file: /cvs/dbus/dbus/test/glib/test-dbus-glib.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- a/test-dbus-glib.c	21 Oct 2003 05:46:52 -0000	1.5
+++ b/test-dbus-glib.c	13 Apr 2004 22:29:50 -0000	1.6
@@ -7,6 +7,13 @@
 static GMainLoop *loop = NULL;
 static int n_times_foo_received = 0;
 
+static gboolean
+timed_exit (gpointer loop)
+{
+  g_main_loop_quit (loop);
+  return TRUE;
+}
+
 static void
 foo_signal_handler (DBusGProxy  *proxy,
                     DBusMessage *signal,
@@ -200,6 +207,8 @@
 
   dbus_connection_flush (connection);
   
+  g_timeout_add (5000, timed_exit, loop);
+
   g_main_loop_run (loop);
 
   if (n_times_foo_received != 1)




More information about the dbus-commit mailing list