From 66a6137efa7530b93096ea7c0b9780d98c7726d7 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Fri, 2 Feb 2018 16:17:54 +0900 Subject: Clean source code * Remove thread loop. * Remove unnecessary define code. Change-Id: I7a7439f7d9555994da71145fe6fb98b8b641bf35 Signed-off-by: Kazumasa Mitsunari --- src/soundmanager.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/soundmanager.c b/src/soundmanager.c index c894c28..f138dae 100644 --- a/src/soundmanager.c +++ b/src/soundmanager.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include "sm-error.h" #include "sm-helper.h" @@ -32,7 +31,6 @@ #define AM_NAME "org.genivi.audiomanager" #define AM_CMD_PATH "/org/genivi/audiomanager/commandinterface" #define AM_ROUTE_PATH "/org/genivi/audiomanager/routinginterface" -#define AM_ROUTE_NAME "org.genivi.audiomanager.routinginterface" #define SOUND_MANAGER_RETURN_INTERFACE "org.genivi.audiomanager.routing.soundmanager" #define SOUND_MANAGER_BUS_NAME "org.genivi.audiomanager.routing.soundmanager" #define SOUND_MANAGER_PATH "/org/genivi/audiomanager/routing/soundmanager" @@ -1382,12 +1380,6 @@ static const struct afb_verb_v2 binding_verbs[]= { .info = "Unsubscribe event" , .session = AFB_SESSION_NONE}, { .verb = NULL } /* marker for end of the array */}; -static void *dbus_event_loop_run(void *args) -{ - loop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(loop); -} - /* * ********** Internal Function used by Sound Manager ********** @@ -1584,12 +1576,6 @@ static int sm_event_init() { goto ev_init_out; } - pthread_t thread_id; - ret = pthread_create(&thread_id, NULL, dbus_event_loop_run, NULL); - if(ret != 0) - { - goto ev_init_out; - } /* initialize signal from audio manager command interface */ g_signal_connect(am_cmd_bus, "volume_changed", @@ -1641,10 +1627,6 @@ static int sm_event_init() return 0; ev_init_out: - if(loop != NULL) - { - g_main_loop_unref(loop); - } AFB_WARNING( "DBus connection is not created"); return -1; } -- cgit 1.2.3-korg