From c2fe23457f87f86a21f3bd64ac7a6f8e8933a359 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Tue, 12 Sep 2017 09:58:55 +0900 Subject: [PATCH] bluetooth: Fix build warnings Change-Id: I0411938d904f64b6e7bd7a13a044b1d553ad9251 Signed-off-by: DoHyun Pyun --- src/modules/bluetooth/module-bluez5-device.c | 36 +++++++++++++++------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c index 809607b..2e64235 100644 --- a/src/modules/bluetooth/module-bluez5-device.c +++ b/src/modules/bluetooth/module-bluez5-device.c @@ -50,6 +50,11 @@ #include #include +#ifdef __TIZEN_BT__ +#include +#include +#endif + #include "a2dp-codecs.h" #include "bluez5-util.h" #include "rtp.h" @@ -2326,28 +2331,27 @@ static pa_hook_result_t device_connection_changed_cb(pa_bluetooth_discovery *y, } #ifdef __TIZEN_BT__ -void dbus_sco_open_handler(struct userdata *u, struct pa_bluetooth_transport *t) +static void dbus_sco_open_handler(struct userdata *u, struct pa_bluetooth_transport *t) { if (u->sink) { - pa_log_info("Suspending sink %s to handle the SCO connection", u->sink->name); - - pa_sink *sink_null = NULL; - pa_sink_input *si; - uint32_t idx; + pa_sink *sink_null; + pa_sink_input *si; + uint32_t idx; - if (pa_sink_check_suspend(u->sink) > 0) { - sink_null = (pa_sink *)pa_namereg_get(u->core, "null", 0); + pa_log_info("Suspending sink %s to handle the SCO connection", u->sink->name); - if (sink_null) - { - PA_IDXSET_FOREACH(si, u->core->sink_inputs, idx) { - pa_sink_input_move_to(si, sink_null, false); - } - } - } + if (pa_sink_check_suspend(u->sink) > 0) { + sink_null = (pa_sink *)pa_namereg_get(u->core, "null", 0); - pa_sink_suspend(u->sink, true, PA_SUSPEND_INTERNAL); + if (sink_null) { + PA_IDXSET_FOREACH(si, u->core->sink_inputs, idx) { + pa_sink_input_move_to(si, sink_null, false); + } + } } + + pa_sink_suspend(u->sink, true, PA_SUSPEND_INTERNAL); + } } /* Run from main thread */ -- 2.7.4