summaryrefslogtreecommitdiffstats
path: root/audio/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/main.c')
-rw-r--r--audio/main.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/audio/main.c b/audio/main.c
index 3cf609f6..470b26d5 100644
--- a/audio/main.c
+++ b/audio/main.c
@@ -73,19 +73,25 @@ int main(int argc, char *argv[])
exit(1);
}
- headset_init(conn);
+ if (audio_init(conn) < 0) {
+ error("Audio init failed!");
+ exit(1);
+ }
- audio_init(conn);
+ if (headset_init(conn) < 0) {
+ error("Headset initialization failed!");
+ exit(1);
+ }
if (argc > 1 && !strcmp(argv[1], "-s"))
register_external_service(conn, "audio", "Audio service", "");
g_main_loop_run(main_loop);
- audio_exit();
-
headset_exit();
+ audio_exit();
+
dbus_connection_unref(conn);
g_main_loop_unref(main_loop);