From ab30a756d89c263cd0e3b4ee88d28ee81c9a556a Mon Sep 17 00:00:00 2001 From: Hyejin Kim Date: Tue, 25 Sep 2012 15:33:58 +0900 Subject: [PATCH 1/1] fix bug : P120921-6157 --- setting-about/src/setting-about-main.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/setting-about/src/setting-about-main.c b/setting-about/src/setting-about-main.c index 8cbfe43..3818715 100755 --- a/setting-about/src/setting-about-main.c +++ b/setting-about/src/setting-about-main.c @@ -303,32 +303,27 @@ void setting_about_main_get_bluetooth_address_string(char *str, int size) { setting_retm_if(str == NULL, "str parameter is NULL"); - //bluetooth_device_address_t local_address; - //memset(&local_address, 0x0, sizeof(local_address)); int ret = 0; - /* for fixing BS of dbus signal */ - //bluetooth_register_callback(NULL, NULL); - //ret = bluetooth_get_local_address(&local_address); - char local_address[1024]; - memset(local_address, 0x0, 1024); + ret = bt_initialize(); + setting_retm_if(ret != 0, "bluetooth initialization failed"); + + char *local_address = NULL; ret = bt_adapter_get_address(&local_address); - /* for fixing BS of dbus signal */ - bluetooth_unregister_callback(); + bt_deinitialize(); if (ret < 0) { snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE")); SETTING_TRACE_DEBUG("bt address : %s", str); } else { - /* - snprintf(str, size, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X", - local_address.addr[0], local_address.addr[1], local_address.addr[2], - local_address.addr[3], local_address.addr[4], local_address.addr[5]); - */ SETTING_TRACE_DEBUG("bt address : %s", local_address); snprintf(str, size, "%s", local_address); } + + if (local_address) { + free(local_address); + } } int __stat_get_cpuinfo(float *usr_pct, float *sys_pct) -- 2.7.4