summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-11-17 23:06:49 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-11-17 23:06:49 +0000
commitea2ad7576177e9202759ec59069a0054f890b19d (patch)
tree7f5d9100ba83a4188f6ff73f6802f4150c4775aa
parent4cfded0ce163301d9723b36340254070b3ab5d7a (diff)
Create one master daemon
-rw-r--r--Makefile.am7
-rw-r--r--daemon/Makefile.am9
-rw-r--r--daemon/main.c24
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 <stdio.h>
#include <errno.h>
-#include <stdlib.h>
-#include <dbus/dbus-glib.h>
+#include <dbus/dbus.h>
+
+#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;
}