Code clean up 17/229117/1
authorWootak Jung <wootak.jung@samsung.com>
Mon, 30 Mar 2020 02:12:55 +0000 (11:12 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 30 Mar 2020 02:12:55 +0000 (11:12 +0900)
[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem]
[Cause & Measure]
[Checking Method]

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: I357ffd7e4932832809c72633757bfb4fea193df0

12 files changed:
bt-api/bt-event-handler.c
bt-api/bt-gatt-client.c
bt-api/bt-telephony.c
bt-oal/bluez_hal/src/bt-hal-adapter-le.c
bt-oal/bluez_hal/src/bt-hal-agent.c
bt-oal/bluez_hal/src/bt-hal-event-receiver.c
bt-oal/bluez_hal/src/bt-hal-gatt-client.c
bt-oal/bluez_hal/src/bt-hal-gatt-server.c
bt-oal/oal-adapter-mgr.c
bt-oal/oal-gatt.c
bt-service-adaptation/services/device/bt-service-core-device.c
bt-service-adaptation/services/gatt/bt-service-gatt.c

index 9240b15..df55260 100644 (file)
@@ -3843,9 +3843,7 @@ static void __bt_gatt_client_event_filter(GDBusConnection *connection,
                g_variant_unref(svc_uuid_var);
                g_variant_unref(char_uuid_var);
                g_variant_unref(desc_uuid_var);
                g_variant_unref(svc_uuid_var);
                g_variant_unref(char_uuid_var);
                g_variant_unref(desc_uuid_var);
-
        } else if (strcasecmp(signal_name, BT_GATT_CLIENT_SERVICE_CHANGED) == 0) {
        } else if (strcasecmp(signal_name, BT_GATT_CLIENT_SERVICE_CHANGED) == 0) {
-               BT_DBG("GATT Client event[BT_GATT_CLIENT_SERVICE_CHANGED]");
                bt_gatt_service_change_t change = {0, };
                char *address_str = NULL;
                char *name = NULL;
                bt_gatt_service_change_t change = {0, };
                char *address_str = NULL;
                char *name = NULL;
@@ -3853,15 +3851,15 @@ static void __bt_gatt_client_event_filter(GDBusConnection *connection,
                g_variant_get(parameters, "(ii&s&s)", &change.inst_id, &change.change_type, &address_str, &change.uuid);
 
                _bt_convert_addr_string_to_type(change.device_addr.addr, address_str);
                g_variant_get(parameters, "(ii&s&s)", &change.inst_id, &change.change_type, &address_str, &change.uuid);
 
                _bt_convert_addr_string_to_type(change.device_addr.addr, address_str);
-               bluetooth_get_uuid_name(change.uuid, &name);
-               BT_INFO(" ### GATT Service %s [%s]", change.change_type ? "Added" : "Removed", name);
-               g_free(name);
 
                if (_bluetooth_gatt_check_service_change_watcher_address(&change.device_addr) == FALSE) {
 
                if (_bluetooth_gatt_check_service_change_watcher_address(&change.device_addr) == FALSE) {
-                       BT_INFO("No watcher for %s", address_str);
                        return;
                }
 
                        return;
                }
 
+               bluetooth_get_uuid_name(change.uuid, &name);
+               BT_INFO(" ### GATT Service %s [%s]", change.change_type ? "Added" : "Removed", name);
+               g_free(name);
+
                _bt_gatt_client_event_cb(BLUETOOTH_EVENT_GATT_CLIENT_SERVICE_CHANGED,
                                BLUETOOTH_ERROR_NONE, &change,
                                event_info->cb, event_info->user_data);
                _bt_gatt_client_event_cb(BLUETOOTH_EVENT_GATT_CLIENT_SERVICE_CHANGED,
                                BLUETOOTH_ERROR_NONE, &change,
                                event_info->cb, event_info->user_data);
index 140cd3a..7bf7bfa 100644 (file)
@@ -2495,7 +2495,9 @@ static gboolean  bluetooth_gatt_client_write_channel_watch_cb(GIOChannel *gio,
                return FALSE;
 
        if (cond & (G_IO_NVAL | G_IO_HUP | G_IO_ERR)) {
                return FALSE;
 
        if (cond & (G_IO_NVAL | G_IO_HUP | G_IO_ERR)) {
-               BT_ERR("Error : GIOCondition %d, [%s]", cond, chr_info->UUID);
+               char  uuid_str[37];
+               _bt_convert_uuid_type_to_string(uuid_str, chr_info->UUID);
+               BT_ERR("Error : GIOCondition %d, [%s]", cond, uuid_str);
                g_io_channel_shutdown(gio, TRUE, NULL);
                g_io_channel_unref(gio);
 
                g_io_channel_shutdown(gio, TRUE, NULL);
                g_io_channel_unref(gio);
 
@@ -2797,8 +2799,6 @@ BT_EXPORT_API int bluetooth_gatt_client_deinit(
 
        if (result != BLUETOOTH_ERROR_NONE)
                BT_ERR("GATT Client Unregistration failed result [%d]", result);
 
        if (result != BLUETOOTH_ERROR_NONE)
                BT_ERR("GATT Client Unregistration failed result [%d]", result);
-       else
-               BT_INFO("GATT Client Unregistration successful");
 
        /* Unregister event handler if this is the only instance */
        event_info = _bt_event_get_cb_data(BT_GATT_CLIENT_EVENT);
 
        /* Unregister event handler if this is the only instance */
        event_info = _bt_event_get_cb_data(BT_GATT_CLIENT_EVENT);
@@ -2806,7 +2806,7 @@ BT_EXPORT_API int bluetooth_gatt_client_deinit(
        if (event_info) {
                count = (int*)event_info->user_data;
 
        if (event_info) {
                count = (int*)event_info->user_data;
 
-               BT_INFO("Total num of GATT client instances [%d]", *count);
+               BT_DBG("Total num of GATT client instances [%d]", *count);
 
                if (*count == 1) {
                        BT_DBG("Currently only one GATT client instance, so remove it and unregister GATT client events");
 
                if (*count == 1) {
                        BT_DBG("Currently only one GATT client instance, so remove it and unregister GATT client events");
index f0e0471..addbcb9 100644 (file)
@@ -659,7 +659,6 @@ int __bluetooth_telephony_register_object(int reg, GDBusNodeInfo *node_info)
                        return BLUETOOTH_TELEPHONY_ERROR_INVALID_PARAM;
 
                path = g_strdup(telephony_info.call_path);
                        return BLUETOOTH_TELEPHONY_ERROR_INVALID_PARAM;
 
                path = g_strdup(telephony_info.call_path);
-               BT_DBG("path is [%s]", path);
 
                bt_tel_id = g_dbus_connection_register_object(telephony_dbus_info.conn,
                                path, node_info->interfaces[0],
 
                bt_tel_id = g_dbus_connection_register_object(telephony_dbus_info.conn,
                                path, node_info->interfaces[0],
@@ -690,11 +689,10 @@ static int __bluetooth_telephony_proxy_init(void)
        gchar *name;
 
        name = g_strdup_printf("org.tizen.csd.Call.Instance.p%d", getpid());
        gchar *name;
 
        name = g_strdup_printf("org.tizen.csd.Call.Instance.p%d", getpid());
-       BT_DBG("well-known name: %s", name);
 
        owner_id = g_bus_own_name_on_connection(telephony_dbus_info.conn,
                                name, G_BUS_NAME_OWNER_FLAGS_NONE, NULL, NULL, NULL, NULL);
 
        owner_id = g_bus_own_name_on_connection(telephony_dbus_info.conn,
                                name, G_BUS_NAME_OWNER_FLAGS_NONE, NULL, NULL, NULL, NULL);
-       BT_DBG("owner_id: %d", owner_id);
+       BT_DBG("well-known name: %s, owner_id: %d", name, owner_id);
        g_free(name);
 
        node_info = __bt_telephony_create_method_node_info(
        g_free(name);
 
        node_info = __bt_telephony_create_method_node_info(
index 27e939d..7e36cf8 100644 (file)
@@ -702,7 +702,6 @@ int _bt_hal_set_advertising_params(int server_if, int min_interval,
                return BT_STATUS_FAIL;
        }
 
                return BT_STATUS_FAIL;
        }
 
-       INFO("Set advertising data");
        if (ret)
                g_variant_unref(ret);
 
        if (ret)
                g_variant_unref(ret);
 
index e2a84bf..026ee1c 100644 (file)
@@ -259,11 +259,8 @@ static void __bt_hal_send_authorize_request_event(const gchar *address, const ch
 
        handle_stack_msg event_cb = _bt_hal_get_stack_message_handler();
        if (event_cb) {
 
        handle_stack_msg event_cb = _bt_hal_get_stack_message_handler();
        if (event_cb) {
-               DBG("Sending AUTHORIZE REQUEST");
                event_cb(HAL_EV_AUTHORIZE_REQUEST, (void*)&ev, sizeof(ev));
        }
                event_cb(HAL_EV_AUTHORIZE_REQUEST, (void*)&ev, sizeof(ev));
        }
-
-       DBG("-");
 }
 
 #ifdef TIZEN_BT_HAL
 }
 
 #ifdef TIZEN_BT_HAL
@@ -287,11 +284,8 @@ static void __bt_hal_send_rfcomm_authorize_request_event(const gchar *address, c
 
        handle_stack_msg event_cb = _bt_hal_get_stack_message_handler();
        if (event_cb) {
 
        handle_stack_msg event_cb = _bt_hal_get_stack_message_handler();
        if (event_cb) {
-               DBG("Sending Socket AUTHORIZE REQUEST");
                event_cb(HAL_EV_SOCK_AUTHORIZE_REQUEST, (void*)&ev, sizeof(ev));
        }
                event_cb(HAL_EV_SOCK_AUTHORIZE_REQUEST, (void*)&ev, sizeof(ev));
        }
-
-       DBG("-");
 }
 #endif
 
 }
 #endif
 
@@ -781,8 +775,6 @@ static gboolean __bt_hal_authorize_request(GapAgentPrivate *agent, GDBusProxy *d
                INFO("Trusted device, so authorize\n");
                gap_agent_reply_authorize(agent, GAP_AGENT_ACCEPT, NULL);
                goto done;
                INFO("Trusted device, so authorize\n");
                gap_agent_reply_authorize(agent, GAP_AGENT_ACCEPT, NULL);
                goto done;
-       } else {
-               INFO("Device is not Trusted, so prompt user to accept or reject authorization \n");
        }
 
        if (!strcasecmp(uuid, BT_HAL_HID_UUID)) {
        }
 
        if (!strcasecmp(uuid, BT_HAL_HID_UUID)) {
index 5483abf..244991c 100644 (file)
@@ -1048,10 +1048,8 @@ static gboolean __bt_hal_event_manager(gpointer data)
                } else {
                        bt_event = __bt_hal_parse_event(value);
                        if (bt_event == BT_HAL_DEVICE_EVENT) {
                } else {
                        bt_event = __bt_hal_parse_event(value);
                        if (bt_event == BT_HAL_DEVICE_EVENT) {
-                               DBG("InterfacesAdded %s ", obj_path);
                                __bt_hal_handle_device_event(value, param->parameters);
                        } else if (bt_event == BT_HAL_AVRCP_CONTROL_EVENT) {
                                __bt_hal_handle_device_event(value, param->parameters);
                        } else if (bt_event == BT_HAL_AVRCP_CONTROL_EVENT) {
-                               DBG("InterfacesAdded %s ", obj_path);
                                _bt_hal_set_control_device_path(obj_path);
                        }
                }
                                _bt_hal_set_control_device_path(obj_path);
                        }
                }
@@ -1064,7 +1062,6 @@ static gboolean __bt_hal_event_manager(gpointer data)
                /*TODO: Handle Interfaces Removed Signal from stack */
 
                g_variant_get(param->parameters, "(&oas)", &obj_path, &iter);
                /*TODO: Handle Interfaces Removed Signal from stack */
 
                g_variant_get(param->parameters, "(&oas)", &obj_path, &iter);
-               DBG("InterfacesRemoved %s ", obj_path);
                while (g_variant_iter_loop(iter, "s", &str)) {
                        if (g_strcmp0(str, BT_HAL_PLAYER_CONTROL_INTERFACE) == 0)
                                _bt_hal_remove_control_device_path(obj_path);
                while (g_variant_iter_loop(iter, "s", &str)) {
                        if (g_strcmp0(str, BT_HAL_PLAYER_CONTROL_INTERFACE) == 0)
                                _bt_hal_remove_control_device_path(obj_path);
index 6bbf12e..a54059c 100644 (file)
@@ -374,8 +374,10 @@ bt_status_t __hal_gattc_unregister_client(int client_if)
 {
        GSList *l;
        hal_gatt_client_app *info = NULL;
 {
        GSList *l;
        hal_gatt_client_app *info = NULL;
+       gboolean is_deleted = FALSE;
+       int client_count;
 
 
-       DBG("registered client count: [%d]", g_slist_length(hal_gattc_client_app_list));
+       client_count =  g_slist_length(hal_gattc_client_app_list);
 
        /* remove the gatt client app */
        for (l = hal_gattc_client_app_list; l != NULL; ) {
 
        /* remove the gatt client app */
        for (l = hal_gattc_client_app_list; l != NULL; ) {
@@ -386,16 +388,18 @@ bt_status_t __hal_gattc_unregister_client(int client_if)
                        continue;
 
                if (info->client_if == client_if) {
                        continue;
 
                if (info->client_if == client_if) {
-                       DBG("gatt client app found");
-
                        __bt_hal_gatt_delete_if(client_if);
                        __bt_hal_gatt_delete_if(client_if);
-
+                       is_deleted = TRUE;
                        hal_gattc_client_app_list = g_slist_remove(hal_gattc_client_app_list, info);
                        g_free(info);
                }
        }
 
                        hal_gattc_client_app_list = g_slist_remove(hal_gattc_client_app_list, info);
                        g_free(info);
                }
        }
 
-       DBG("registered client count: [%d]", g_slist_length(hal_gattc_client_app_list));
+       if (is_deleted)
+               DBG("Deleted. registered client count: [%d -> %d]", client_count, g_slist_length(hal_gattc_client_app_list));
+       else
+               ERR("Not deleted. registered client count: [%d]", client_count);
+
        return BT_STATUS_SUCCESS;
 }
 
        return BT_STATUS_SUCCESS;
 }
 
@@ -592,7 +596,7 @@ static hal_gattc_service_t* _gattc_find_service_from_uuid(hal_gattc_server_info_
 
                if (!memcmp(&info->svc_uuid, svc_uuid, sizeof(bt_uuid_t)))
                        return info;
 
                if (!memcmp(&info->svc_uuid, svc_uuid, sizeof(bt_uuid_t)))
                        return info;
-               }
+       }
 
        return NULL;
 }
 
        return NULL;
 }
@@ -648,7 +652,7 @@ static hal_gattc_desc_t* _gattc_find_desc_from_uuid(hal_gattc_char_t *gattc_char
 
                if (!memcmp(&info->desc_uuid, desc_uuid, sizeof(bt_uuid_t)))
                        return info;
 
                if (!memcmp(&info->desc_uuid, desc_uuid, sizeof(bt_uuid_t)))
                        return info;
-               }
+       }
        return NULL;
 }
 
        return NULL;
 }
 
@@ -676,8 +680,7 @@ static void _hal_gattc_add_characteristic(hal_gattc_service_t *gatt_svc, char *c
        gattc_char = g_malloc0(sizeof(hal_gattc_char_t));
        gattc_char->chr_path = g_strdup(char_handle);
 
        gattc_char = g_malloc0(sizeof(hal_gattc_char_t));
        gattc_char->chr_path = g_strdup(char_handle);
 
-       DBG("svc path: [%s]", gatt_svc->svc_path);
-       DBG("char path: [%s]", gattc_char->chr_path);
+       DBG("[%s]", gattc_char->chr_path + 15);
 
        gatt_svc->gatt_list_chars = g_slist_append(gatt_svc->gatt_list_chars, gattc_char);
 }
 
        gatt_svc->gatt_list_chars = g_slist_append(gatt_svc->gatt_list_chars, gattc_char);
 }
@@ -747,8 +750,7 @@ static void _hal_gattc_update_desc_property(hal_gattc_desc_t *gattc_desc, const
        }
 
        //update the descriptor uuid
        }
 
        //update the descriptor uuid
-       DBG("desc UUID: [%s] ", desc_uuid_str);
-       DBG("desc path: [%s]", gattc_desc->desc_path);
+       DBG("%s %s",  gattc_desc->desc_path + 37, desc_uuid_str);
 
        _bt_hal_convert_uuid_string_to_type(gattc_desc->desc_uuid.uu, desc_uuid_str);
 }
 
        _bt_hal_convert_uuid_string_to_type(gattc_desc->desc_uuid.uu, desc_uuid_str);
 }
@@ -877,7 +879,7 @@ static bt_status_t _gattc_client_search_service(int conn_id)
                        if (g_strcmp0(interface_str, GATT_SERV_INTERFACE) != 0)
                                continue;
 
                        if (g_strcmp0(interface_str, GATT_SERV_INTERFACE) != 0)
                                continue;
 
-                       DBG("[%d] Object Path : %s", idx++, object_path);
+                       DBG("[%d] %s", idx++, object_path + 15);
                        /* for characteristic */
                        gp_char_array = g_ptr_array_new();
                        while (g_variant_iter_loop(svc_iter, "{sv}", &key, &value)) {
                        /* for characteristic */
                        gp_char_array = g_ptr_array_new();
                        while (g_variant_iter_loop(svc_iter, "{sv}", &key, &value)) {
@@ -1202,7 +1204,6 @@ bt_status_t btif_gattc_get_characteristic(int conn_id,
        CHECK_BTGATT_INIT();
 
        if (start_char_id == NULL) {
        CHECK_BTGATT_INIT();
 
        if (start_char_id == NULL) {
-               DBG("Get all the characteristics");
                return _gattc_get_all_characteristic(conn_id, srvc_id);
 
        } else {
                return _gattc_get_all_characteristic(conn_id, srvc_id);
 
        } else {
@@ -1341,7 +1342,7 @@ static bt_status_t _hal_gattc_get_all_descriptor(int conn_id,
        }
 
        _bt_hal_convert_uuid_type_to_string(svc_uuid_str, gattc_service->svc_uuid.uu);
        }
 
        _bt_hal_convert_uuid_type_to_string(svc_uuid_str, gattc_service->svc_uuid.uu);
-       INFO("%s %s", gattc_service->svc_path + 37, svc_uuid_str);
+//     DBG("%s %s", gattc_service->svc_path + 37, svc_uuid_str);
 
        /* find characteristics */
        /* a service can have two char with same uuid */
 
        /* find characteristics */
        /* a service can have two char with same uuid */
@@ -1352,7 +1353,7 @@ static bt_status_t _hal_gattc_get_all_descriptor(int conn_id,
 
                if (!memcmp(&gattc_char->chr_uuid, &char_id->uuid, sizeof(bt_uuid_t))) {
                        _bt_hal_convert_uuid_type_to_string(char_uuid_str, gattc_char->chr_uuid.uu);
 
                if (!memcmp(&gattc_char->chr_uuid, &char_id->uuid, sizeof(bt_uuid_t))) {
                        _bt_hal_convert_uuid_type_to_string(char_uuid_str, gattc_char->chr_uuid.uu);
-                       INFO("%s %s", gattc_char->chr_path + 37, char_uuid_str);
+//                     DBG("%s %s", gattc_char->chr_path + 37, char_uuid_str);
 
                        /* get descriptor uuid */
                        for (m = gattc_char->gatt_list_descs; m != NULL; m = g_slist_next(m)) {
 
                        /* get descriptor uuid */
                        for (m = gattc_char->gatt_list_descs; m != NULL; m = g_slist_next(m)) {
@@ -1569,8 +1570,6 @@ static void __hal_send_char_write_event(hal_gatt_resp_data_t *resp_data, int res
        memcpy(ev.svc_uuid, resp_data->srvc_id.id.uuid.uu, sizeof(ev.svc_uuid));
        memcpy(ev.char_uuid, resp_data->char_id.uuid.uu, sizeof(ev.char_uuid));
 
        memcpy(ev.svc_uuid, resp_data->srvc_id.id.uuid.uu, sizeof(ev.svc_uuid));
        memcpy(ev.char_uuid, resp_data->char_id.uuid.uu, sizeof(ev.char_uuid));
 
-       DBG("sending gatt client charac write event. conn_id[%d] status[%d]", resp_data->conn_id, result);
-
        event_cb(HAL_EV_GATT_CLIENT_WRITE_CHARAC, (void *)&ev, sizeof(ev));
 }
 
        event_cb(HAL_EV_GATT_CLIENT_WRITE_CHARAC, (void *)&ev, sizeof(ev));
 }
 
@@ -1583,8 +1582,6 @@ static void __hal_bluetooth_internal_write_cb(GObject *source_object,
        hal_gatt_resp_data_t *resp_data = user_data;
        int result = BT_STATUS_SUCCESS;
 
        hal_gatt_resp_data_t *resp_data = user_data;
        int result = BT_STATUS_SUCCESS;
 
-       DBG("+");
-
        system_gconn = _bt_hal_get_system_gconn();
        value = g_dbus_connection_call_finish(system_gconn, res, &error);
 
        system_gconn = _bt_hal_get_system_gconn();
        value = g_dbus_connection_call_finish(system_gconn, res, &error);
 
@@ -1605,7 +1602,6 @@ static void __hal_bluetooth_internal_write_cb(GObject *source_object,
        g_free(resp_data);
        g_variant_unref(value);
 
        g_free(resp_data);
        g_variant_unref(value);
 
-       DBG("-");
 }
 
 static bt_status_t __hal_get_write_prop(hal_gatt_write_type_t type, bt_gatt_characteristic_property_t *prop)
 }
 
 static bt_status_t __hal_get_write_prop(hal_gatt_write_type_t type, bt_gatt_characteristic_property_t *prop)
@@ -3320,7 +3316,7 @@ static hal_gattc_server_info_t *__bt_find_gatt_conn_info(const bt_bdaddr_t *serv
 
                if (!memcmp(&info->bd_addr, serv_addr, sizeof(bt_bdaddr_t)))
                        return info;
 
                if (!memcmp(&info->bd_addr, serv_addr, sizeof(bt_bdaddr_t)))
                        return info;
-               }
+       }
 
        return NULL;
 }
 
        return NULL;
 }
@@ -3337,7 +3333,7 @@ static hal_gattc_client_info_t *__bt_find_gatt_client_info(bt_bdaddr_t *serv_add
 
                if (!memcmp(&info->bd_addr, serv_addr, sizeof(bt_bdaddr_t)))
                        return info;
 
                if (!memcmp(&info->bd_addr, serv_addr, sizeof(bt_bdaddr_t)))
                        return info;
-               }
+       }
 
        return NULL;
 }
 
        return NULL;
 }
@@ -3354,7 +3350,7 @@ static hal_gattc_client_info_t *__bt_find_gatt_client_info_from_conn_id(int conn
 
                if (info->conn_id == conn_id)
                        return info;
 
                if (info->conn_id == conn_id)
                        return info;
-               }
+       }
 
        return NULL;
 }
 
        return NULL;
 }
@@ -3989,7 +3985,7 @@ void _bt_hal_handle_gattc_service_changed_event(gboolean is_added, const char *p
                /* Get service UUID from path */
                __bt_hal_gattc_get_uuid_from_path(path, &uuid_str);
                if (uuid_str) {
                /* Get service UUID from path */
                __bt_hal_gattc_get_uuid_from_path(path, &uuid_str);
                if (uuid_str) {
-                       DBG("conn_id(%d) GATT Service(%s) Added", server_info->conn_id, uuid_str);
+                       INFO("conn_id(%d) GATT Service(%s) Added", server_info->conn_id, uuid_str);
                        _bt_hal_convert_uuid_string_to_type(ev.uuid, uuid_str);
                        g_free(uuid_str);
                } else {
                        _bt_hal_convert_uuid_string_to_type(ev.uuid, uuid_str);
                        g_free(uuid_str);
                } else {
@@ -4010,7 +4006,7 @@ void _bt_hal_handle_gattc_service_changed_event(gboolean is_added, const char *p
                                memcpy(ev.uuid, service->svc_uuid.uu, sizeof(bt_uuid_t));
                                uuid_str = g_malloc0(BT_HAL_UUID_STRING_LEN);
                                _bt_hal_convert_uuid_type_to_string(uuid_str, ev.uuid);
                                memcpy(ev.uuid, service->svc_uuid.uu, sizeof(bt_uuid_t));
                                uuid_str = g_malloc0(BT_HAL_UUID_STRING_LEN);
                                _bt_hal_convert_uuid_type_to_string(uuid_str, ev.uuid);
-                               DBG("conn_id(%d) GATT Service(%s) Removed", server_info->conn_id, uuid_str);
+                               INFO("conn_id(%d) GATT Service(%s) Removed", server_info->conn_id, uuid_str);
 
                                /* Remove service info in list */
                                server_info->gatt_list_services = g_slist_remove(server_info->gatt_list_services, service);
 
                                /* Remove service info in list */
                                server_info->gatt_list_services = g_slist_remove(server_info->gatt_list_services, service);
index 899010f..e31e692 100644 (file)
@@ -3585,8 +3585,6 @@ static bt_status_t gatt_server_multi_adv_enable(int server_if)
 
        struct hal_gatts_server_register_info_t *server_register_info = NULL;
 
 
        struct hal_gatts_server_register_info_t *server_register_info = NULL;
 
-       DBG("server_if: [%d]", server_if);
-
        server_register_info =  bt_hal_gatts_find_server_register_info(server_if);
        if (server_register_info == NULL) {
                ERR("gatt server is not registered");
        server_register_info =  bt_hal_gatts_find_server_register_info(server_if);
        if (server_register_info == NULL) {
                ERR("gatt server is not registered");
@@ -3613,7 +3611,7 @@ static bt_status_t gatt_server_multi_adv_update(int server_if, int min_interval,
                int chnl_map, int tx_power, int timeout_s)
 {
        CHECK_BTGATT_INIT();
                int chnl_map, int tx_power, int timeout_s)
 {
        CHECK_BTGATT_INIT();
-       DBG("+");
+
        /* Send Advertising parameters to LE Module */
        return _bt_hal_set_advertising_params(server_if, min_interval, max_interval, adv_type,
                        chnl_map, tx_power, timeout_s);
        /* Send Advertising parameters to LE Module */
        return _bt_hal_set_advertising_params(server_if, min_interval, max_interval, adv_type,
                        chnl_map, tx_power, timeout_s);
index 3853d18..52812bc 100644 (file)
@@ -1141,13 +1141,9 @@ void cb_controller_error_received(uint8_t error_code)
 {
        uint8_t *event_data;
 
 {
        uint8_t *event_data;
 
-       BT_DBG("+");
-
        event_data = g_new0(uint8_t, 1);
        *event_data = error_code;
 
        send_event(OAL_EVENT_CONTROLLER_ERROR_RECEIVED,
                (gpointer)event_data, sizeof(uint8_t));
        event_data = g_new0(uint8_t, 1);
        *event_data = error_code;
 
        send_event(OAL_EVENT_CONTROLLER_ERROR_RECEIVED,
                (gpointer)event_data, sizeof(uint8_t));
-
-       BT_DBG("-");
 }
 }
index f98a4e0..61453d1 100644 (file)
@@ -1472,8 +1472,6 @@ static void cb_gattc_search_result(int conn_id, btgatt_srvc_id_t *srvc_id)
 {
        char uuid_str[2*BT_UUID_STRING_MAX];
 
 {
        char uuid_str[2*BT_UUID_STRING_MAX];
 
-       BT_INFO("BTGATT Client Service Search Result cb, conn_id:%d", conn_id);
-
        uuid_to_stringname((oal_uuid_t *)&(srvc_id->id.uuid), uuid_str);
        BT_INFO("Service=> [%s], Inst_id [%u], Type [%s]",
                uuid_str, srvc_id->id.inst_id, srvc_id->is_primary ? "Primary" : "Secondary");
        uuid_to_stringname((oal_uuid_t *)&(srvc_id->id.uuid), uuid_str);
        BT_INFO("Service=> [%s], Inst_id [%u], Type [%s]",
                uuid_str, srvc_id->id.inst_id, srvc_id->is_primary ? "Primary" : "Secondary");
@@ -1506,9 +1504,9 @@ static void cb_gattc_get_characteristics(int conn_id, int status, btgatt_srvc_id
        char uuid_str2[2*BT_UUID_STRING_MAX];
        char str[50];
 
        char uuid_str2[2*BT_UUID_STRING_MAX];
        char str[50];
 
-       BT_INFO("BTGATT Client Get Characteristic Callback, conn_id:%d, status:%d", conn_id, status);
+       BT_DBG("BTGATT Client Get Characteristic Callback, conn_id:%d, status:%d", conn_id, status);
        uuid_to_stringname((oal_uuid_t *)&(srvc_id->id.uuid), uuid_str1);
        uuid_to_stringname((oal_uuid_t *)&(srvc_id->id.uuid), uuid_str1);
-       BT_INFO("Service=> [%s], Inst_id [%u], Type [%s]",
+       BT_DBG("Service=> [%s], Inst_id [%u], Type [%s]",
                uuid_str1, srvc_id->id.inst_id, srvc_id->is_primary ? "Primary" : "Secondary");
 
        event_gattc_characteristic_result_t *event = g_new0(event_gattc_characteristic_result_t, 1);
                uuid_str1, srvc_id->id.inst_id, srvc_id->is_primary ? "Primary" : "Secondary");
 
        event_gattc_characteristic_result_t *event = g_new0(event_gattc_characteristic_result_t, 1);
@@ -1533,12 +1531,12 @@ static void cb_gattc_get_descriptor(int conn_id, int status, btgatt_srvc_id_t *s
        char uuid_str1[2*BT_UUID_STRING_MAX];
        char uuid_str2[2*BT_UUID_STRING_MAX];
        char uuid_str3[2*BT_UUID_STRING_MAX];
        char uuid_str1[2*BT_UUID_STRING_MAX];
        char uuid_str2[2*BT_UUID_STRING_MAX];
        char uuid_str3[2*BT_UUID_STRING_MAX];
-       BT_INFO("BTGATT Client Get Descriptor Callback, conn_id:%d, status:%d", conn_id, status);
+       BT_DBG("BTGATT Client Get Descriptor Callback, conn_id:%d, status:%d", conn_id, status);
        uuid_to_stringname((oal_uuid_t *)&(srvc_id->id.uuid), uuid_str1);
        uuid_to_stringname((oal_uuid_t *)&(char_id->uuid), uuid_str2);
        uuid_to_stringname((oal_uuid_t *)&(srvc_id->id.uuid), uuid_str1);
        uuid_to_stringname((oal_uuid_t *)&(char_id->uuid), uuid_str2);
-       BT_INFO("Service=> [%s], Inst_id [%u], Type [%s]",
+       BT_DBG("Service=> [%s], Inst_id [%u], Type [%s]",
                uuid_str1, srvc_id->id.inst_id, srvc_id->is_primary ? "Primary" : "Secondary");
                uuid_str1, srvc_id->id.inst_id, srvc_id->is_primary ? "Primary" : "Secondary");
-       BT_INFO("Charac => [%s], Inst_id [%u]", uuid_str2, char_id->inst_id);
+       BT_DBG("Charac => [%s], Inst_id [%u]", uuid_str2, char_id->inst_id);
 
        event_gattc_descriptor_result_t *event = g_new0(event_gattc_descriptor_result_t, 1);
        event->conn_status.conn_id = conn_id;
 
        event_gattc_descriptor_result_t *event = g_new0(event_gattc_descriptor_result_t, 1);
        event->conn_status.conn_id = conn_id;
@@ -1931,7 +1929,7 @@ oal_status_t gattc_get_characteristic(int conn_id, oal_gatt_srvc_id_t *srvc_id,
 
        OAL_CHECK_PARAMETER(srvc_id, return);
        uuid_to_stringname(&(srvc_id->id.uuid), uuid_str);
 
        OAL_CHECK_PARAMETER(srvc_id, return);
        uuid_to_stringname(&(srvc_id->id.uuid), uuid_str);
-       API_TRACE("Client Get Characteristic, Service_uuid: [%s]", uuid_str);
+       API_TRACE("Client Get Characteristic [%s]", uuid_str);
        CHECK_OAL_GATT_ENABLED();
        CHECK_CLIENT_CONNECTION(conn_id);
        ret = gatt_api->client->get_characteristic(conn_id, (btgatt_srvc_id_t *)srvc_id,
        CHECK_OAL_GATT_ENABLED();
        CHECK_CLIENT_CONNECTION(conn_id);
        ret = gatt_api->client->get_characteristic(conn_id, (btgatt_srvc_id_t *)srvc_id,
index a0fe7cc..ef7361c 100644 (file)
@@ -2394,8 +2394,6 @@ int _bt_add_le_conn_param_info(const char *address, const char *sender,
        bt_le_conn_param_t *param = NULL;
        bt_le_conn_param_t *data = NULL;
 
        bt_le_conn_param_t *param = NULL;
        bt_le_conn_param_t *data = NULL;
 
-       BT_DBG("+");
-
        if (!address || !sender)
                return BLUETOOTH_ERROR_INVALID_PARAM;
 
        if (!address || !sender)
                return BLUETOOTH_ERROR_INVALID_PARAM;
 
@@ -2568,7 +2566,7 @@ int _bt_le_connection_update(const char *sender,
 
        dev = __bt_get_le_connected_dev_info(address);
        if (dev == NULL) {
 
        dev = __bt_get_le_connected_dev_info(address);
        if (dev == NULL) {
-               BT_DBG("device not found in the list");
+               BT_ERR("device not found in the list");
                ret = BLUETOOTH_ERROR_NOT_CONNECTED;
                goto fail;
        }
                ret = BLUETOOTH_ERROR_NOT_CONNECTED;
                goto fail;
        }
@@ -2599,7 +2597,6 @@ update:
                goto fail;
        }
 
                goto fail;
        }
 
-       BT_DBG("updated LE connection parameter");
        dev->interval_min = interval_min;
        dev->interval_max = interval_max;
 
        dev->interval_min = interval_min;
        dev->interval_max = interval_max;
 
index ca85a17..0ed94be 100644 (file)
@@ -2181,7 +2181,7 @@ static void __bt_gatt_event_handler(int event_type, gpointer event_data)
                break;
        }
        case OAL_EVENT_GATTC_SERVICE_SEARCH_RESULT: {
                break;
        }
        case OAL_EVENT_GATTC_SERVICE_SEARCH_RESULT: {
-               BT_INFO("OAL Event: GATT Client Service Search Result");
+               BT_DBG("OAL Event: GATT Client Service Search Result");
                __bt_handle_client_service_search_result((event_gattc_service_result_t *) event_data);
                break;
        }
                __bt_handle_client_service_search_result((event_gattc_service_result_t *) event_data);
                break;
        }
@@ -2191,32 +2191,32 @@ static void __bt_gatt_event_handler(int event_type, gpointer event_data)
                break;
        }
        case OAL_EVENT_GATTC_CHARAC_SERACH_RESULT: {
                break;
        }
        case OAL_EVENT_GATTC_CHARAC_SERACH_RESULT: {
-               BT_INFO("OAL Event: GATT Client Characteristic Search Result");
+               BT_DBG("OAL Event: GATT Client Characteristic Search Result");
                __bt_handle_client_characteristic_search_result((event_gattc_characteristic_result_t *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_DESC_SERACH_RESULT: {
                __bt_handle_client_characteristic_search_result((event_gattc_characteristic_result_t *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_DESC_SERACH_RESULT: {
-               BT_INFO("OAL Event: GATT Client Descriptor Search Result");
+               BT_DBG("OAL Event: GATT Client Descriptor Search Result");
                __bt_handle_client_descriptor_search_result((event_gattc_descriptor_result_t *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_READ_CHARAC: {
                __bt_handle_client_descriptor_search_result((event_gattc_descriptor_result_t *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_READ_CHARAC: {
-               BT_INFO("OAL Event: GATT Client Characteristic Read Data");
+               BT_DBG("OAL Event: GATT Client Characteristic Read Data");
                __bt_handle_client_characteristic_read_data((event_gattc_read_data *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_READ_DESCR: {
                __bt_handle_client_characteristic_read_data((event_gattc_read_data *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_READ_DESCR: {
-               BT_INFO("OAL Event: GATT Client Descriptor Read Data");
+               BT_DBG("OAL Event: GATT Client Descriptor Read Data");
                __bt_handle_client_descriptor_read_data((event_gattc_read_data *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_WRITE_CHARAC: {
                __bt_handle_client_descriptor_read_data((event_gattc_read_data *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_WRITE_CHARAC: {
-               BT_INFO("OAL Event: GATT Client Characteristic Write Data");
+               BT_DBG("OAL Event: GATT Client Characteristic Write Data");
                __bt_handle_client_characteristic_write_data((event_gattc_write_data *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_WRITE_DESCR: {
                __bt_handle_client_characteristic_write_data((event_gattc_write_data *) event_data);
                break;
        }
        case OAL_EVENT_GATTC_WRITE_DESCR: {
-               BT_INFO("OAL Event: GATT Client Descriptor Write Data");
+               BT_DBG("OAL Event: GATT Client Descriptor Write Data");
                __bt_handle_client_descriptor_write_data((event_gattc_write_data *) event_data);
                break;
        }
                __bt_handle_client_descriptor_write_data((event_gattc_write_data *) event_data);
                break;
        }
@@ -2236,7 +2236,7 @@ static void __bt_gatt_event_handler(int event_type, gpointer event_data)
                break;
        }
        case OAL_EVENT_GATTC_NOTIFY_DATA: {
                break;
        }
        case OAL_EVENT_GATTC_NOTIFY_DATA: {
-               BT_INFO("OAL Event: GATT Client Notification Data");
+               BT_DBG("OAL Event: GATT Client Notification Data");
                __bt_handle_client_notification_data((event_gattc_notify_data *) event_data);
                break;
        }
                __bt_handle_client_notification_data((event_gattc_notify_data *) event_data);
                break;
        }
@@ -3477,7 +3477,7 @@ static void __bt_handle_client_descriptor_search_result(
        bt_gatt_descriptor_info_t *desc_info;
        bt_descriptor_browse_info_t browse_info;
 
        bt_gatt_descriptor_info_t *desc_info;
        bt_descriptor_browse_info_t browse_info;
 
-       BT_INFO("descriptor search result status [%d]", event_data->conn_status.status);
+       BT_DBG("descriptor search result status [%d]", event_data->conn_status.status);
 
        memset(&browse_info, 0x00, sizeof(bt_descriptor_browse_info_t));
 
 
        memset(&browse_info, 0x00, sizeof(bt_descriptor_browse_info_t));
 
@@ -5006,7 +5006,7 @@ int _bt_unregister_gatt_client_instance(const char *sender, int client_id)
        bt_service_app_info_t *info = NULL;
        int k, ret;
 
        bt_service_app_info_t *info = NULL;
        int k, ret;
 
-       BT_INFO("Unregister Allocated GATT Client instance [%s] Client ID [%d]", sender, client_id);
+       BT_DBG("Unregister Allocated GATT Client instance [%s] Client ID [%d]", sender, client_id);
 
        /* Unregister CLient instance associated with address X. It is possible that another app still
           has client_id valid for same remote address */
 
        /* Unregister CLient instance associated with address X. It is possible that another app still
           has client_id valid for same remote address */
@@ -5015,7 +5015,6 @@ int _bt_unregister_gatt_client_instance(const char *sender, int client_id)
 
                /* Exact matching of sender */
                if (!g_strcmp0(info->sender, sender) && info->client_id == client_id) {  /* Check for only valid GATT client Instance */
 
                /* Exact matching of sender */
                if (!g_strcmp0(info->sender, sender) && info->client_id == client_id) {  /* Check for only valid GATT client Instance */
-                       BT_INFO("Unregister GATT client instance [%d]", info->client_id);
                        numapps[k].client_id = -1;
                        numapps[k].is_initialized = FALSE;
                        memset(numapps[k].sender, 0x00, sizeof(numapps[k].sender));
                        numapps[k].client_id = -1;
                        numapps[k].is_initialized = FALSE;
                        memset(numapps[k].sender, 0x00, sizeof(numapps[k].sender));