summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-06-08 20:35:15 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-06-08 20:35:15 +0000
commit19363c93557f8163f6f0a7ef0fe17c1eb73c5c96 (patch)
tree2058cef0066a9b1b04f87259672154ec9bdf5d8b
parentf4eb9e2dea643f41e261bb9e2bff33fc03bd9ecc (diff)
Load plugins early in the boot process
-rw-r--r--hcid/main.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/hcid/main.c b/hcid/main.c
index 8cf89bfd..b415d6e5 100644
--- a/hcid/main.c
+++ b/hcid/main.c
@@ -918,9 +918,17 @@ int main(int argc, char *argv[])
exit(1);
}
+ start_sdp_server(mtu, hcid.deviceid, SDP_SERVER_COMPAT);
+ set_service_classes_callback(update_service_classes);
+
+ /* Loading plugins has to be done after D-Bus has been setup since
+ * the plugins might wanna expose some paths on the bus. However the
+ * best order of how to init various subsystems of the Bluetooth
+ * daemon needs to be re-worked. */
+ plugin_init(config);
+
init_security_data();
- /* Create event loop */
event_loop = g_main_loop_new(NULL, FALSE);
ctl_io = g_io_channel_unix_new(hcid.sock);
@@ -933,16 +941,6 @@ int main(int argc, char *argv[])
/* Initialize already connected devices */
init_all_devices(hcid.sock);
- start_sdp_server(mtu, hcid.deviceid, SDP_SERVER_COMPAT);
- set_service_classes_callback(update_service_classes);
-
- /* Loading plugins has to be done after D-Bus has been setup since
- * the plugins might wanna expose some paths on the bus. However the
- * best order of how to init various subsystems of the Bluetooth
- * daemon needs to be re-worked. */
- plugin_init(config);
-
- /* Start event processor */
g_main_loop_run(event_loop);
plugin_cleanup();