Code clean up for debug message 83/224583/1
authorinjun.yang <injun.yang@samsung.com>
Fri, 7 Feb 2020 02:15:43 +0000 (11:15 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 12 Feb 2020 00:05:55 +0000 (09:05 +0900)
Change-Id: Iffa256dfa4950fdd967daf10e2fc0614b6a2bfad
Signed-off-by: injun.yang <injun.yang@samsung.com>
13 files changed:
bt-api/bt-device.c
bt-api/bt-gatt-client.c
bt-oal/bluez_hal/src/bt-hal-bluetooth.c
bt-oal/bluez_hal/src/bt-hal-event-receiver.c
bt-oal/bluez_hal/src/bt-hal-gatt-client.c
bt-service-adaptation/services/bt-request-handler.c
bt-service-adaptation/services/bt-service-common.c
bt-service-adaptation/services/bt-service-event-receiver.c
bt-service-adaptation/services/bt-service-event-sender.c
bt-service-adaptation/services/device/bt-service-core-device.c
bt-service-adaptation/services/gatt/bt-service-gatt.c
bt-service-adaptation/services/ipsp/bt-service-ipsp-event-receiver.c
bt-service-adaptation/services/obex/bt-service-obex-event-receiver.c

index ebbb4c6..8b80037 100644 (file)
@@ -430,7 +430,7 @@ BT_EXPORT_API int bluetooth_disconnect_le(const bluetooth_device_address_t *devi
 
        g_array_append_vals(in_param1, device_address, sizeof(bluetooth_device_address_t));
 #ifdef TIZEN_GATT_CLIENT
-       BT_INFO("Send GATT disconnect using Client Interface [%d]", client_id);
+       BT_DBG("Send GATT disconnect using Client Interface [%d]", client_id);
        g_array_append_vals(in_param2, &client_id, sizeof(int));
 #endif
        user_info = _bt_get_user_data(BT_COMMON);
index 887870f..140cd3a 100644 (file)
@@ -50,8 +50,6 @@ static GSList *service_monitor_list = NULL;
 
 BT_EXPORT_API int bluetooth_gatt_free_service_property(bt_gatt_service_property_t *svc_pty)
 {
-       BT_DBG("+");
-
        BT_CHECK_PARAMETER(svc_pty, return);
 
 #ifdef TIZEN_GATT_CLIENT
@@ -65,14 +63,11 @@ BT_EXPORT_API int bluetooth_gatt_free_service_property(bt_gatt_service_property_
 
        memset(svc_pty, 0, sizeof(bt_gatt_service_property_t));
 
-       BT_DBG("-");
        return BLUETOOTH_ERROR_NONE;
 }
 
 BT_EXPORT_API int bluetooth_gatt_free_char_property(bt_gatt_char_property_t *char_pty)
 {
-       BT_DBG("+");
-
        BT_CHECK_PARAMETER(char_pty, return);
 
        g_free(char_pty->uuid);
@@ -86,14 +81,11 @@ BT_EXPORT_API int bluetooth_gatt_free_char_property(bt_gatt_char_property_t *cha
 
        memset(char_pty, 0, sizeof(bt_gatt_char_property_t));
 
-       BT_DBG("-");
        return BLUETOOTH_ERROR_NONE;
 }
 
 BT_EXPORT_API int bluetooth_gatt_free_desc_property(bt_gatt_char_descriptor_property_t *desc_pty)
 {
-       BT_DBG("+");
-
        BT_CHECK_PARAMETER(desc_pty, return);
 
        g_free(desc_pty->uuid);
@@ -104,7 +96,6 @@ BT_EXPORT_API int bluetooth_gatt_free_desc_property(bt_gatt_char_descriptor_prop
 
        memset(desc_pty, 0, sizeof(bt_gatt_char_descriptor_property_t));
 
-       BT_DBG("-");
        return BLUETOOTH_ERROR_NONE;
 }
 
@@ -2366,7 +2357,7 @@ BT_EXPORT_API int bluetooth_gatt_client_watch_characteristics(
                        int fd = -1;
 
                        fd_list_array = g_unix_fd_list_steal_fds(out_fd_list, &len);
-                       BT_INFO("Num fds in fd_list is : %d, fd_list[0]: %d", len, fd_list_array[0]);
+                       BT_DBG("Num fds in fd_list is : %d, fd_list[0]: %d", len, fd_list_array[0]);
                        fd = fd_list_array[0];
                        mtu =  g_array_index(out_param, int, 0);
 
index afefed3..3e8752e 100644 (file)
@@ -769,12 +769,10 @@ static void __bt_hal_handle_device_le_conn_state_changed_event(void *buf, uint16
        bt_bdaddr_t bd_addr;
 
        memcpy(bd_addr.address, ev->bdaddr, 6);
-       /* BD address */
-       DBG("Address: [%02X:%02X:%02X:%02X:%02X:%02X]", bd_addr.address[0],
-                       bd_addr.address[1], bd_addr.address[2], bd_addr.address[3],
-                       bd_addr.address[4], bd_addr.address[5]);
-       DBG("LE conn Status [0x%x]", ev->status);
-       DBG("LE conn State  [0x%x]", ev->state);
+
+       DBG("LE conn Status [0x%x] State [0x%x] [%02X:%02X:%02X:%02X:%02X:%02X]", ev->status, ev->state,
+                       bd_addr.address[0], bd_addr.address[1], bd_addr.address[2],
+                       bd_addr.address[3], bd_addr.address[4], bd_addr.address[5]);
 
 #ifdef TIZEN_BT_HAL
        if (!bt_hal_cbacks->le_conn_state_changed_cb) {
index 1bbd4c3..9321872 100644 (file)
@@ -1595,13 +1595,12 @@ static void __bt_hal_device_property_changed_event(GVariant *msg, const char *pa
                        DBG("Device property changed : RSSI");
                        __bt_hal_dbus_device_found_properties(path);
                } else if (!g_strcmp0(key, "GattConnected")) {
-                       DBG("Device property changed : GattConnected");
                        gboolean gatt_connected = FALSE;
                        g_variant_get(value, "b", &gatt_connected);
+                       INFO("Device property changed : GattConnected [%d]", gatt_connected);
+
                        char *address = g_malloc0(BT_HAL_ADDRESS_STRING_SIZE);
                        _bt_hal_convert_device_path_to_address(path, address);
-                       DBG("@@gatt_connected: %d", gatt_connected);
-                       DBG("@@address: %s", address);
                        _bt_hal_gatt_connected_state_event(gatt_connected, address);
                        _bt_hal_handle_gattc_connected_event(address, gatt_connected);
                        g_free(address);
@@ -1623,10 +1622,8 @@ static void __bt_hal_device_property_changed_event(GVariant *msg, const char *pa
 
                        if (!event_cb) {
                                ERR("Bluetooth HAL event handler not registered");
-                       } else {
-                               DBG("Sending HAL_EV_BOND_STATE_CHANGED event");
+                       } else
                                event_cb(HAL_EV_BOND_STATE_CHANGED, (void*)&ev, sizeof(ev));
-                       }
                } else if (!g_strcmp0(key, "LegacyPaired")) {
                        DBG("Device property changed : LegacyPaired");
                } else if (!g_strcmp0(key, "Trusted")) {
@@ -1938,7 +1935,6 @@ static void __bt_hal_send_device_acl_connection_state_event(int status, gboolean
 
 static void __bt_hal_send_device_le_connection_state_event(int status, gboolean connected, const char *address)
 {
-       DBG("+");
        struct hal_ev_le_conn_state_changed ev;
 
        ev.status = status;
@@ -1958,7 +1954,6 @@ static void __bt_hal_send_device_trust_state_event(gboolean is_trusted,
                                const char *address)
 {
        struct hal_ev_device_trust_state_changed ev;
-       DBG("+");
 
        ev.trust = (is_trusted == TRUE) ?
                HAL_DEVICE_TRUSTED :
@@ -1976,7 +1971,6 @@ static void __bt_hal_send_device_trusted_profile_changed_event(
                uint32_t trust_val, const char *address)
 {
        struct hal_ev_device_trusted_profiles_changed ev;
-       DBG("+");
 
        _bt_hal_convert_addr_string_to_type(ev.bdaddr, address);
        ev.trust_val = trust_val;
@@ -2076,7 +2070,6 @@ static void __bt_hal_handle_device_specific_events(GVariant *msg, const char *me
                address = g_malloc0(BT_HAL_ADDRESS_STRING_SIZE);
                _bt_hal_convert_device_path_to_address(path, address);
 
-               DBG("[%s] %s, state %d", address, profile_uuid, state);
                if (strncmp(profile_uuid, HID_UUID, strlen(HID_UUID)) == 0) {
                        DBG("HID Host Profile state: %d", state);
                        if (state == BT_HAL_PROFILE_STATE_CONNECTED)
@@ -2160,7 +2153,7 @@ static void __bt_hal_handle_device_specific_events(GVariant *msg, const char *me
                                DBG("AVRCP Controller Profile state changed: BT_HAL_PROFILE_STATE_CONNECTING");
                        }
                } else {
-                       DBG("Profile[%s] State changed status [%d] ", profile_uuid, state);
+                       DBG("Profile [%s] State changed [%d] [%s] ", profile_uuid, state, address);
                }
                g_free(address);
                g_free(profile_uuid);
@@ -2170,8 +2163,6 @@ static void __bt_hal_handle_device_specific_events(GVariant *msg, const char *me
 
                address = g_malloc0(BT_HAL_ADDRESS_STRING_SIZE);
 
-               DBG("Member: [%s]", member);
-
                _bt_hal_convert_device_path_to_address(path, address);
                g_variant_get(msg, "(q)", &mtu);
 
@@ -2243,12 +2234,9 @@ static void __bt_hal_handle_gatts_mtu_changed_event(char *address, int mtu)
        memset(buf, 0, sizeof(buf));
        size = sizeof(*ev);
 
-       DBG("Address: %s, mtu: %d", address, mtu);
-
        ev->conn_id = _bt_get_remote_gatt_client_conn_id(address);
        ev->mtu = mtu;
 
-       DBG("Send GATT server mtu changed event to HAL, size: [%zd]", size);
        gatt_event_cb(HAL_EV_GATT_SERVER_MTU_CHANGED, buf, size);
 }
 
index 17ccddb..0789abe 100644 (file)
@@ -660,9 +660,8 @@ static hal_gattc_service_t* _hal_gatt_client_add_service(hal_gattc_server_info_t
        _bt_hal_convert_uuid_string_to_type(gattc_service->svc_uuid.uu, uuid_str);
        gattc_service->is_primary = is_primary;
 
-       INFO("[%d] [%s] [%s]", g_slist_length(conn_info->gatt_list_services), object_path + 15, uuid_str);
-
        conn_info->gatt_list_services = g_slist_append(conn_info->gatt_list_services, gattc_service);
+       INFO("Toatal svc [%d] Added [%s] [%s]", g_slist_length(conn_info->gatt_list_services), object_path + 15, uuid_str);
 
        return gattc_service;
 }
@@ -3383,8 +3382,6 @@ static bt_status_t __bt_connect_le_device_internal(int client_if, const bt_bdadd
        int ret = BT_STATUS_SUCCESS;
        hal_gattc_client_info_t *gattc_data;
 
-       DBG("+");
-
        if (NULL == bd_addr) {
                ERR("bd_addr is NULL");
                return BT_STATUS_PARM_INVALID;
@@ -3404,7 +3401,6 @@ static bt_status_t __bt_connect_le_device_internal(int client_if, const bt_bdadd
                ret = BT_STATUS_FAIL;
                return ret;
        }
-       ERR("device_path:%s", device_path);
 
        device_proxy = g_dbus_proxy_new_sync(conn, G_DBUS_PROXY_FLAGS_NONE,
                        NULL, BT_HAL_BLUEZ_NAME,
@@ -3419,7 +3415,7 @@ static bt_status_t __bt_connect_le_device_internal(int client_if, const bt_bdadd
        memcpy(gattc_data->bd_addr.address, bd_addr->address,
                                        BT_HAL_ADDRESS_LENGTH_MAX);
 
-       DBG("Connect LE [%s]", device_address);
+       DBG("ConnectLE [%s]", device_address);
 
        gattc_data->client_if = client_if;
 
@@ -3495,8 +3491,6 @@ static void __le_connection_req_cb(GDBusProxy *proxy, GAsyncResult *res,
        struct hal_ev_gatt_client_connected ev;
        hal_gattc_server_info_t *gatt_conn_info = NULL;
 
-       DBG("+");
-
        reply = g_dbus_proxy_call_finish(proxy, res, &g_error);
        g_object_unref(proxy);
        if (reply == NULL) {
@@ -3510,7 +3504,7 @@ static void __le_connection_req_cb(GDBusProxy *proxy, GAsyncResult *res,
        g_variant_unref(reply);
 
        if (NULL == gattc_data) {
-               ERR("server_data is NULL");
+               ERR("gattc_data is NULL");
                return;
        }
 
@@ -3533,7 +3527,7 @@ static void __le_connection_req_cb(GDBusProxy *proxy, GAsyncResult *res,
                goto fail;
        }
 
-       DBG("adding the server conn info in list");
+       DBG("LE connected. Adding the gattc server/client conn info in list");
        gattc_data->conn_id = __hal_generate_conn_id() ;
        gattc_data->inst_id = __hal_generate_server_instance_id();
 
@@ -3546,7 +3540,6 @@ static void __le_connection_req_cb(GDBusProxy *proxy, GAsyncResult *res,
        gatt_conn_info->inst_id = gattc_data->inst_id;
        hal_gattc_server_info_list = g_slist_append(hal_gattc_server_info_list, gatt_conn_info);
 
-       DBG("-");
        return;
 
 fail:
@@ -3662,7 +3655,6 @@ void _bt_hal_handle_gattc_connected_event(char* address, gboolean gatt_connected
        if (!event_cb) {
                ERR("gatt client callback not registered");
        } else {
-               DBG("sending gatt client connected status  event");
                event_cb(event, (void *)&ev, sizeof(ev));
        }
 
@@ -3880,10 +3872,8 @@ static bt_status_t __hal_gattc_get_service_info(hal_gattc_server_info_t *server_
        while (g_variant_iter_loop(property_iter, "{sv}", &key, &value)) {
                if (g_strcmp0(key, "UUID") == 0) {
                        uuid_str = g_variant_get_string(value, &len);
-                       DBG("UUID: %s", uuid_str);
                } else if (g_strcmp0(key, "Primary") == 0) {
                        is_primary = g_variant_get_boolean(value);
-                       DBG("is_primary: %s", is_primary ? "TRUE" : "FALSE");
                } else if (g_strcmp0(key, "Characteristics") == 0) {
                        g_variant_get(value, "ao", &char_iter);
                        if (char_iter != NULL) {
@@ -3908,7 +3898,7 @@ done:
        g_variant_iter_free(property_iter);
        g_variant_unref(result);
        g_object_unref(properties_proxy);
-       DBG("-");
+
        return BT_STATUS_SUCCESS;
 }
 
index 4c0eef7..a24c73c 100644 (file)
@@ -369,7 +369,7 @@ static void __bt_service_method(GDBusConnection *connection,
 
                if (request_type == BT_ASYNC_REQ ||
                                __bt_is_sync_function(service_function)) {
-                       BT_INFO("Do not send reply to bt-api over dbus,"
+                       BT_DBG("Do not send reply to bt-api over dbus,"
                                " Invocation context is already saved in service_function");
                        goto done;
                }
@@ -2761,20 +2761,17 @@ int __bt_bluez_request(int function_name,
                __bt_service_get_parameters(in_param3,
                                &client_id, sizeof(int));
 
-               BT_INFO("GATT Client: client_id[%d]", client_id);
+               BT_DBG("GATT Client: client_id[%d]", client_id);
                result = _bt_connect_le_device(&address, auto_connect, client_id);
                if (BLUETOOTH_ERROR_NONE == result) {
-
                        addr = g_malloc0(BT_ADDRESS_STRING_SIZE);
-                       BT_INFO("GATT Client: Save Invocation data Connect LE app[%s]", sender);
-
                        _bt_convert_addr_type_to_string(addr, address.addr);
 
                        /* Save the informations to invocation */
                        _bt_save_invocation_context(context, result, sender,
                                        function_name, (gpointer)addr);
                } else {
-                       BT_ERR("GATT Client: gatt connect failed");
+                       BT_ERR("GATT Client: gatt connect failed. client_id[%d]", client_id);
                        g_array_append_vals(*out_param1, &address,
                                        sizeof(bluetooth_device_address_t));
                }
index 008003c..d6ed3b7 100644 (file)
@@ -534,7 +534,6 @@ int _bt_copy_utf8_string(char *dest, const char *src, unsigned int length)
 
 gboolean _bt_utf8_validate(char *name)
 {
-       BT_DBG("+");
        gunichar2 *u16;
        glong items_written = 0;
 
@@ -550,7 +549,6 @@ gboolean _bt_utf8_validate(char *name)
        if (items_written != g_utf8_strlen(name, -1))
                return FALSE;
 
-       BT_DBG("-");
        return TRUE;
 }
 
@@ -1395,8 +1393,6 @@ invocation_info_t* _bt_get_request_info_data(int service_function, char *address
        GSList *l;
        invocation_info_t *req_info = NULL;
 
-       BT_DBG("+");
-
        retv_if(NULL == address, NULL);
 
        /* Get method invocation context */
@@ -1409,7 +1405,6 @@ invocation_info_t* _bt_get_request_info_data(int service_function, char *address
                        return req_info;
        }
 
-       BT_DBG("-");
        return NULL;
 }
 
index 9c4e3d7..0299e49 100644 (file)
@@ -412,7 +412,7 @@ void _bt_service_oal_event_receiver(int event_type, gpointer event_data, gsize l
 {
        bt_service_oal_event_data_t *oal_event = g_new0(bt_service_oal_event_data_t, 1);
 
-       BT_INFO("event_type: [%d], data size: [%zu]", event_type, len);
+       BT_DBG("event_type: [%d], data size: [%zu]", event_type, len);
 
        oal_event->type = event_type;
        if (event_data)
index 9da97fa..f4083b9 100644 (file)
@@ -450,15 +450,19 @@ int _bt_send_event(int event_type, int event, GVariant *param)
 #ifdef TIZEN_GATT_CLIENT
        case BLUETOOTH_EVENT_GATT_SERVER_CONNECTED: /* GATT Server and Client */
                signal = BT_GATT_SERVER_CONNECTED;
+               BT_INFO_C("### Connected [GATT server]");
                break;
        case BLUETOOTH_EVENT_GATT_SERVER_DISCONNECTED: /* GATT Client and Server */
                signal = BT_GATT_SERVER_DISCONNECTED;
+               BT_INFO_C("### Disconnected [GATT server]");
                break;
        case BLUETOOTH_EVENT_GATT_CLIENT_CONNECTED: /* GATT Server and Client */
                signal = BT_GATT_CLIENT_CONNECTED;
+               BT_INFO_C("### Connected [GATT client]");
                break;
        case BLUETOOTH_EVENT_GATT_CLIENT_DISCONNECTED: /* GATT Client and Server */
                signal = BT_GATT_CLIENT_DISCONNECTED;
+               BT_INFO_C("### Disconnected [GATT client]");
                break;
 #else
        case BLUETOOTH_EVENT_GATT_CONNECTED:
index 68c55a7..d0ce179 100644 (file)
@@ -1028,7 +1028,7 @@ static void __bt_device_dbfw_plus_info_callback(event_dev_dbfw_plus_info_t *dbfw
 static void __bt_device_event_handler(int event_type, gpointer event_data)
 {
        int eventcheck = OAL_EVENT_DEVICE_PROPERTIES;
-       BT_INFO("event [%d] Event check = [%d]", event_type, eventcheck);
+       BT_DBG("event [%d] Event check = [%d]", event_type, eventcheck);
 
        switch (event_type) {
        case OAL_EVENT_ADAPTER_INQUIRY_RESULT_BREDR_ONLY: {
@@ -1507,13 +1507,12 @@ static void __bt_device_acl_state_changed_callback(event_dev_conn_status_t *acl_
        GVariant *param = NULL;
        bt_device_conn_info_t conn_info;
 
-       BT_DBG("+");
        _bt_convert_addr_type_to_string(address, acl_event->address.addr);
 
        _bt_logging_connection(connected, type);
 
        result = __bt_oal_status_to_bt_error(acl_event->status);
-       BT_INFO("Result [0x%x]", result);
+       BT_DBG("Result [0x%x]", result);
 
        if (connected) {
                param = g_variant_new("(isy)", result, address, type);
@@ -1536,13 +1535,10 @@ static void __bt_device_acl_state_changed_callback(event_dev_conn_status_t *acl_
 
 #ifdef TIZEN_GATT_CLIENT
        /*handle LE connected device info*/
-       if (type) {
-               BT_DBG("handle LE connected device info");
+       if (type)
                _bt_handle_le_connected_dev_info(address, connected);
-       }
 #endif
 
-       BT_DBG("-");
 }
 
 static void __bt_device_remote_device_found_callback(gpointer event_data, gboolean is_ble)
@@ -2389,10 +2385,9 @@ static void _bt_remove_le_connected_dev_info(const char *address)
        return;
 }
 
-
 static void _bt_handle_le_connected_dev_info(const char *address, gboolean connected)
 {
-       BT_DBG("+");
+       BT_DBG("update le_connected_dev_list");
 
        if (connected)
                _bt_add_le_connected_dev_info(address);
index 5bcae15..2a93723 100644 (file)
@@ -881,7 +881,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
 #ifndef GATT_DIRECT
                case BT_GATT_SERVER_REGISTER: {
                        bt_service_app_info_t *param = (bt_service_app_info_t*)data;
-                       BT_INFO("Sender [%s] Request Sender [%s]", param->sender, req_info->sender);
+                       BT_DBG("Sender [%s] Request Sender [%s]", param->sender, req_info->sender);
                        if (!g_strcmp0(req_info->sender, param->sender)) {
                                BT_DBG("GATT Server app found [%s]", req_info->sender);
 
@@ -898,7 +898,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                case BT_GATT_SERVER_START_SERVICE:
                case BT_GATT_SERVER_DELETE_SERVICE: {
                        bt_service_app_info_t *param = (bt_service_app_info_t*)data;
-                       BT_INFO("Sender [%s] Request Sender [%s]", param->sender, req_info->sender);
+                       BT_DBG("Sender [%s] Request Sender [%s]", param->sender, req_info->sender);
 
                        int *saved_instance_id = (int*)req_info->user_data;
                        if (!g_strcmp0(req_info->sender, param->sender) && param->instance_id == *saved_instance_id) {
@@ -919,7 +919,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                case BT_GATT_SERVER_ADD_DESCRIPTOR:
                case BT_GATT_SERVER_ADD_CHARACTERISTIC: {
                        int *handle = (int*)data;
-                       BT_INFO("Characteristic added: Handle [%d]", *handle);
+                       BT_DBG("Characteristic added: Handle [%d]", *handle);
                        out_param = g_array_new(FALSE, FALSE, sizeof(gchar));
 
                        g_array_append_vals(out_param, handle, sizeof(int));
@@ -968,7 +968,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
 #ifdef TIZEN_GATT_CLIENT
                case BT_GATT_CLIENT_REGISTER: {
                        bt_service_app_info_t *param = (bt_service_app_info_t*)data;
-                       BT_INFO("Sender [%s] Request Sender [%s]", param->sender, req_info->sender);
+                       BT_DBG("Sender [%s] Request Sender [%s]", param->sender, req_info->sender);
                        if (!g_strcmp0(req_info->sender, param->sender)) {
                                BT_DBG("GATT Client app found [%s] created client ID [%d]",
                                                req_info->sender, param->client_id);
@@ -989,7 +989,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                        _bt_convert_addr_type_to_string(address,
                                        (unsigned char *)(&param->device_addr.addr));
 
-                       BT_INFO("Request Sender [%s] address [%s]", req_info->sender, address);
+                       BT_DBG("Request Sender [%s] address [%s]", req_info->sender, address);
 
                        /* Match address to determine same request */
                        if (!g_strcmp0((char*)req_info->user_data, address)) {
@@ -1014,7 +1014,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                        bt_char_browse_info_t param;
                        memcpy((void*)&param, data, sizeof(bt_char_browse_info_t));
                        //bt_char_browse_info_t *param = (bt_char_browse_info_t*)data;
-                       BT_INFO("Request Sender [%s]", req_info->sender);
+                       BT_DBG("Request Sender [%s]", req_info->sender);
                        bluetooth_gatt_client_svc_prop_info_t *prop = (bluetooth_gatt_client_svc_prop_info_t*)req_info->user_data;
 
                        /* Match both address and service properties to determine same request */
@@ -1023,7 +1023,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                                        sizeof(bluetooth_device_address_t)) &&
                                        !memcmp(param.svc_uuid, prop->svc.uuid, BLUETOOTH_UUID_HEX_MAX_LEN) &&
                                        param.svc_inst_id == prop->svc.instance_id) {
-                               BT_INFO("Returning Service properties");
+                               BT_DBG("Returning Service properties");
 
                                out_param = g_array_new(FALSE, FALSE, sizeof(gchar));
                                g_array_append_vals(out_param, &param, sizeof(bt_char_browse_info_t));
@@ -1038,7 +1038,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                case BT_GATT_GET_CHARACTERISTIC_PROPERTIES: {
                        bt_descriptor_browse_info_t *param = (bt_descriptor_browse_info_t*)data;
 
-                       BT_INFO("Request Sender [%s]", req_info->sender);
+                       BT_DBG("Request Sender [%s]", req_info->sender);
                        bluetooth_gatt_client_char_prop_info_t *prop = (bluetooth_gatt_client_char_prop_info_t*)req_info->user_data;
 
                        /* Match both address, service properties &char properties to determine same request */
@@ -1049,7 +1049,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                                        param->svc_inst_id == prop->svc.instance_id &&
                                        !memcmp(param->char_uuid, prop->characteristic.uuid, BLUETOOTH_UUID_HEX_MAX_LEN) &&
                                        param->char_inst_id == prop->characteristic.instance_id) {
-                               BT_INFO("Returning Characteristic properties");
+                               BT_DBG("Returning Characteristic properties");
                                out_param = g_array_new(FALSE, FALSE, sizeof(gchar));
                                                g_array_append_vals(out_param, param, sizeof(bt_descriptor_browse_info_t));
                                _bt_service_method_return(req_info->context, out_param, result);
@@ -1063,7 +1063,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                case BT_GATT_WATCH_CHARACTERISTIC: {
                        bt_gatt_notif_reg_info_t *param = (bt_gatt_notif_reg_info_t*)data;
                        bluetooth_gatt_client_char_prop_info_t *prop = (bluetooth_gatt_client_char_prop_info_t*)req_info->user_data;
-                       BT_INFO("Request Sender [%s]", req_info->sender);
+                       BT_DBG("Request Sender [%s]", req_info->sender);
                        /* Match both address, service properties &char properties to determine same request */
                        if (!memcmp(param->addr.addr,
                                        prop->device_address.addr,
@@ -1086,14 +1086,14 @@ static void __bt_gatt_handle_pending_request_info(int result,
                case BT_GATT_READ_CHARACTERISTIC:
                case BT_GATT_WRITE_CHARACTERISTIC_VALUE_BY_TYPE: {
                         bluetooth_gatt_client_char_prop_info_t *param = (bluetooth_gatt_client_char_prop_info_t*)data;
-                        BT_INFO("Request Sender [%s]", req_info->sender);
+                        BT_DBG("Request Sender [%s]", req_info->sender);
 
                         char *addr = g_malloc0(sizeof(char) * BT_ADDRESS_STRING_SIZE);
                         bluetooth_gatt_client_char_prop_info_t *prop = (bluetooth_gatt_client_char_prop_info_t*)req_info->user_data;
                         _bt_convert_addr_type_to_string(addr, prop->device_address.addr);
 
                         if (!memcmp(param, prop, sizeof(bluetooth_gatt_client_char_prop_info_t))) {
-                                BT_INFO("Gatt Char read or write request matched for address [%s]", addr);
+                                BT_DBG("Gatt Char read or write request matched for address [%s]", addr);
                                 out_param = g_array_new(FALSE, FALSE, sizeof(gchar));
                                 g_array_append_vals(out_param, param, sizeof(bluetooth_gatt_client_char_prop_info_t));
                                 _bt_service_method_return(req_info->context, out_param, result);
@@ -1108,14 +1108,14 @@ static void __bt_gatt_handle_pending_request_info(int result,
                case BT_GATT_READ_DESCRIPTOR_VALUE:
                case BT_GATT_WRITE_DESCRIPTOR_VALUE: {
                         bluetooth_gatt_client_desc_prop_info_t *param = (bluetooth_gatt_client_desc_prop_info_t*)data;
-                        BT_INFO("Request Sender [%s]", req_info->sender);
+                        BT_DBG("Request Sender [%s]", req_info->sender);
 
                         char *addr = g_malloc0(sizeof(char) * BT_ADDRESS_STRING_SIZE);
                         bluetooth_gatt_client_desc_prop_info_t *prop = (bluetooth_gatt_client_desc_prop_info_t*)req_info->user_data;
                         _bt_convert_addr_type_to_string(addr, prop->device_address.addr);
 
                         if (!memcmp(param, prop, sizeof(bluetooth_gatt_client_desc_prop_info_t))) {
-                                BT_INFO("Descriptor read or write request matched for address [%s]", addr);
+                                BT_DBG("Descriptor read or write request matched for address [%s]", addr);
                                 out_param = g_array_new(FALSE, FALSE, sizeof(gchar));
                                 g_array_append_vals(out_param, param, sizeof(bluetooth_gatt_client_desc_prop_info_t));
                                 _bt_service_method_return(req_info->context, out_param, result);
@@ -1132,7 +1132,7 @@ static void __bt_gatt_handle_pending_request_info(int result,
                        bluetooth_device_address_t address;
 
                        if (!g_strcmp0(addr, (char*)data)) {
-                               BT_INFO("GATT Client BT_REQ_ATT_MTU call pending for app [%s] addr [%s]",
+                               BT_DBG("GATT Client BT_REQ_ATT_MTU call pending for app [%s] addr [%s]",
                                                req_info->sender, addr);
                                out_param = g_array_new(FALSE, FALSE, sizeof(gchar));
                                _bt_convert_addr_string_to_type(address.addr, addr);
@@ -1151,7 +1151,6 @@ static void __bt_gatt_handle_pending_request_info(int result,
                        break;
                }
        }
-       BT_DBG("-");
 }
 
 static void __bt_handle_server_instance_registered(event_gatts_register_t *data)
@@ -2034,7 +2033,6 @@ static void __bt_handle_gatt_mtu_changed_event(event_gatts_mtu_changed_t *event)
        struct gatt_client_info_t *conn_info = NULL;
        GVariant *param = NULL;
        guint8 status = 0;
-       BT_INFO("GATT Server MTU changed event");
 
        conn_info = __bt_find_remote_gatt_client_info_from_conn_id(event->conn_id);
        if (conn_info == NULL) {
@@ -3149,10 +3147,9 @@ static void __bt_handle_client_connected(event_gattc_conn_t *event_data)
                        conn_info = g_new0(struct gatt_server_info_t, 1);
                        conn_info->addr = g_strdup(address);
                        conn_info->client_id = event_data->client_if;
-                       BT_INFO("Added GATT server addr[%s]", conn_info->addr);
                        conn_info->connection_id = event_data->conn_id;
                        gatt_server_info_list = g_slist_append(gatt_server_info_list, conn_info);
-                       BT_INFO("Total num of connected Remote GATT server devices [%d]",
+                       BT_DBG("Total num of connected Remote GATT server devices [%d]",
                                        g_slist_length(gatt_server_info_list));
 
 #if 0
@@ -4247,7 +4244,7 @@ int _bt_connect_le_device(bluetooth_device_address_t *address,
 
        addr = g_malloc0(sizeof(char) * BT_ADDRESS_STRING_SIZE);
        _bt_convert_addr_type_to_string(addr, address->addr);
-       BT_INFO("GATT Client connect request for address [%s] client instance [%d]",
+       BT_DBG("GATT Client connect request for address [%s] client instance [%d]",
                        addr, client_id);
 
 
@@ -4256,7 +4253,7 @@ int _bt_connect_le_device(bluetooth_device_address_t *address,
        if (req_info) {
                remote_address = (char*)req_info->user_data;
                if (remote_address && !strcasecmp(remote_address, addr)) {/* Address matched */
-                       BT_INFO("Already Connection ongoing for same remote GATT Server address [%s]", remote_address);
+                       BT_DBG("Already Connection ongoing for same remote GATT Server address [%s]", remote_address);
                        /* Return and wait for events to be sent to all apps */
                        g_free(addr);
                        return BLUETOOTH_ERROR_IN_PROGRESS;
@@ -4275,9 +4272,8 @@ int _bt_connect_le_device(bluetooth_device_address_t *address,
 
        /* Check if app sent 0 client id for connection, in such case, use default gatt client ID */
        if (client_id == 0) {
-               BT_INFO("GATT CLient connect request sent by an app without any client instance [%d]",
-                               client_id);
-               BT_INFO("Assign default GATT client id [%d]", gatt_default_client);
+               /* GATT CLient connect request sent by an app without any client instance [0] */
+               BT_DBG("Assign default GATT client id [%d]", gatt_default_client);
                client_id = gatt_default_client;
        }
 
@@ -4285,7 +4281,7 @@ int _bt_connect_le_device(bluetooth_device_address_t *address,
        ret = gattc_connect(client_id, (bt_address_t*)(address), auto_connect);
 
        if (ret != OAL_STATUS_SUCCESS) {
-               BT_ERR("ret: %d", ret);
+               BT_ERR("gattc_connect is failed. ret: %d", ret);
                g_free(addr);
                return BLUETOOTH_ERROR_INTERNAL;
        }
@@ -4307,7 +4303,7 @@ int _bt_gatt_get_primary_services(char *address)
        struct gatt_server_info_t *conn_info = NULL;
        invocation_info_t *req_info = NULL;
        int ret = OAL_STATUS_SUCCESS;
-       BT_INFO("+");
+       BT_DBG("+");
 
        /* Check if any app is already browsing primary services on the same remote GATT Server */
        req_info = _bt_get_request_info_data(BT_GATT_GET_PRIMARY_SERVICES, address);
@@ -4898,8 +4894,6 @@ int _bt_disconnect_le_device(bluetooth_device_address_t *address,
 
        BT_CHECK_PARAMETER(address, return);
 
-       BT_INFO("+");
-
        addr = g_malloc0(sizeof(char) * BT_ADDRESS_STRING_SIZE);
        _bt_convert_addr_type_to_string(addr, address->addr);
        BT_INFO("GATT Client Disconnect request for address [%s]", addr);
@@ -4909,7 +4903,7 @@ int _bt_disconnect_le_device(bluetooth_device_address_t *address,
        if (req_info) {
                remote_address = (char*)req_info->user_data;
                if (remote_address && !strcasecmp(remote_address, addr)) {/* Address matched */
-                       BT_INFO("Already DisConnection ongoing for same remote GATT Server address [%s]", remote_address);
+                       BT_DBG("Already DisConnection ongoing for same remote GATT Server address [%s]", remote_address);
                        /* Return success and wait for events to be sent to all apps */
                        g_free(addr);
                        return BLUETOOTH_ERROR_IN_PROGRESS;
index 9a35cb9..1fd52f5 100644 (file)
@@ -44,8 +44,6 @@ static void __bt_ipsp_property_changed_event(GVariant *msg, const char *path);
 
 static void __bt_device_property_changed_event(GVariant *msg, const char *path)
 {
-       BT_DBG("+");
-
        int event;
        int result = BLUETOOTH_ERROR_NONE;
        GVariantIter value_iter;
@@ -99,7 +97,6 @@ static void __bt_device_property_changed_event(GVariant *msg, const char *path)
                        g_free(address);
                }
        }
-       BT_DBG("-");
 }
 
 void _bt_handle_ipsp_device_event(GVariant *msg, const char *member, const char *path)
index 7e897c1..37769ff 100644 (file)
@@ -421,7 +421,6 @@ char *_bt_get_bonded_device_name(char *address)
 void _bt_handle_device_event(GVariant *msg, const char *member, const char *path)
 {
        char *address;
-       char secure_address[BT_ADDRESS_STRING_SIZE] = { 0 };
        ret_if(path == NULL);
 
        if (strcasecmp(member, "Disconnected") == 0) {
@@ -448,21 +447,6 @@ void _bt_handle_device_event(GVariant *msg, const char *member, const char *path
                }
                g_free(address);
                g_free(dev_name);
-       } else if (strcasecmp(member, "ProfileStateChanged") == 0) {
-               int state = 0;
-               char *profile_uuid = NULL;
-               bluetooth_device_address_t bd_addr;
-
-               g_variant_get(msg, "(si)", &profile_uuid, &state);
-
-               address = g_malloc0(BT_ADDRESS_STRING_SIZE);
-
-               _bt_convert_device_path_to_address(path, address);
-               _bt_convert_addr_string_to_type(bd_addr.addr, address);
-
-               _bt_convert_addr_string_to_secure_string(secure_address, address);
-               BT_DBG("[%s] [%s] [%d]", secure_address, profile_uuid, state);
-               g_free(address);
        }
 }