From ea2ad7576177e9202759ec59069a0054f890b19d Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 17 Nov 2006 23:06:49 +0000 Subject: Create one master daemon --- Makefile.am | 7 ++++--- daemon/Makefile.am | 9 ++++++--- daemon/main.c | 24 ++++-------------------- 3 files changed, 14 insertions(+), 26 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3f121085..528650e7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,8 @@ -SUBDIRS = common daemon network input audio sync \ - tools rfcomm hcid sdpd dund pand hidd \ - cups fuse alsa test scripts +SUBDIRS = common hcid sdpd daemon \ + network input audio sync \ + tools rfcomm dund pand hidd \ + cups fuse alsa test scripts MAINTAINERCLEANFILES = Makefile.in \ aclocal.m4 configure config.h.in config.sub config.guess \ diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 51855d7b..2de14550 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -4,15 +4,18 @@ noinst_PROGRAMS = bluetoothd bt.echod bluetoothd_SOURCES = main.c -bluetoothd_LDADD = @GLIB_LIBS@ @BLUEZ_LIBS@ $(top_builddir)/common/libhelper.a +bluetoothd_LDADD = @DBUS_LIBS@ @BLUEZ_LIBS@ + $(top_builddir)/hcid/libhciserver.a + $(top_builddir)/sdpd/libsdpserver.a + $(top_builddir)/common/libhelper.a bt_echod_SOURCES = echo.c bt_echod_LDADD = @GLIB_LIBS@ @BLUEZ_LIBS@ -AM_CFLAGS = @BLUEZ_CFLAGS@ @GLIB_CFLAGS@ +AM_CFLAGS = @BLUEZ_CFLAGS@ @DBUS_CFLAGS@ @GLIB_CFLAGS@ -INCLUDES = -I$(top_srcdir)/common +INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/hcid -I$(top_srcdir)/sdpd BUILT_SOURCES = service-agent-glue.h diff --git a/daemon/main.c b/daemon/main.c index 6ce8ef81..6432dd9b 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -27,29 +27,13 @@ #include #include -#include -#include +#include + +#include "hcid.h" +#include "sdpd.h" int main(int argc, char *argv[]) { - GMainLoop *mainloop; - DBusGConnection *conn; - GError *error = NULL; - - g_type_init(); - - mainloop = g_main_loop_new(NULL, FALSE); - - conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error); - if (error != NULL) { - g_printerr("Connecting to system bus failed: %s\n", - error->message); - g_error_free(error); - exit(EXIT_FAILURE); - } - - g_main_loop_run(mainloop); - return 0; } -- cgit