From 98572905e60cac7ea971aa0830e2a629bfff208d Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Mon, 7 Apr 2003 01:07:13 +0000 Subject: 2003-04-06 Havoc Pennington * test/Makefile.am: remove a lot of stuff that isn't immediately useful, it's in CVS history if we want it. * test/test-service.c: use dbus-mainloop instead of that watch.[hc] crack --- test/test-service.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'test/test-service.c') diff --git a/test/test-service.c b/test/test-service.c index 49048f66..9e06b604 100644 --- a/test/test-service.c +++ b/test/test-service.c @@ -1,7 +1,7 @@ -#include -#include -#include -#include "watch.h" + +#include "test-utils.h" + +static DBusLoop *loop; static void die (const char *message) @@ -79,7 +79,12 @@ main (int argc, return 1; } - setup_connection (connection); + loop = _dbus_loop_new (); + if (loop == NULL) + die ("No memory\n"); + + if (!test_connection_setup (loop, connection)) + die ("No memory\n"); handler = dbus_message_handler_new (echo_handler, NULL, NULL); if (handler == NULL) @@ -98,11 +103,14 @@ main (int argc, return 1; } - do_mainloop (); + _dbus_loop_run (loop); dbus_connection_unref (connection); dbus_message_handler_unref (handler); + + _dbus_loop_unref (loop); + loop = NULL; dbus_shutdown (); -- cgit