code clean up
[platform/core/connectivity/bluetooth-frwk.git] / bt-service-adaptation / services / gatt / bt-service-gatt.c
index 0ed94be..3067535 100644 (file)
@@ -846,13 +846,13 @@ int _bt_register_server_instance(const char *sender, int adv_handle)
        int k;
        oal_uuid_t uuid;
 
-       BT_INFO("###Check on which instance Server instance can be initialized....");
+       BT_INFO("Check on which instance Server instance can be initialized....");
        for (k = 1; k < MAX_APPS_SUPPORTED; k++) {
                if (numapps[k].is_initialized == 1) {
-                       BT_INFO("Instance ID [%d] is already in use..Check next slot", numapps[k].instance_id);
+                       BT_DBG("Instance ID [%d] is already in use..Check next slot", numapps[k].instance_id);
                } else {
                        slot = k;
-                       BT_INFO("Time to register GATT Server..UUID to be used is [%s] slot [%d]", uuid_list[slot-1], slot);
+                       BT_DBG("Time to register GATT Server..UUID to be used is [%s] slot [%d]", uuid_list[slot-1], slot);
                        break;
                }
        }
@@ -874,7 +874,7 @@ int _bt_register_server_instance(const char *sender, int adv_handle)
                g_free(uuid_string);
                return BLUETOOTH_ERROR_INTERNAL;
        }
-       BT_INFO("GATT Server registration call successfully accepted by OAL..wait for Instance Initialized event from OAL..");
+       BT_DBG("GATT Server registration call successfully accepted by OAL..wait for Instance Initialized event from OAL..");
        /* Return & wait for GATT Server Instance Initialization event */
        memset(numapps[slot].sender, 0x00, sizeof(numapps[slot].sender));
        memset(numapps[slot].uuid, 0x00, sizeof(numapps[slot].uuid));
@@ -908,7 +908,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_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);
 
@@ -925,7 +925,6 @@ 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_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) {
@@ -995,7 +994,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_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);
@@ -1016,8 +1015,6 @@ static void __bt_gatt_handle_pending_request_info(int result,
                        _bt_convert_addr_type_to_string(address,
                                        (unsigned char *)(&param->device_addr.addr));
 
-                       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)) {
                                BT_DBG("GATT Client app found [%s] Remote address [%s]",
@@ -1041,7 +1038,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_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 */
@@ -1065,7 +1062,6 @@ 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_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 */
@@ -1090,7 +1086,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_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,
@@ -1113,7 +1109,6 @@ 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_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;
@@ -1135,7 +1130,6 @@ 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_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;
@@ -3045,7 +3039,7 @@ int _bt_register_gatt_client_instance(const char *sender,
        oal_uuid_t uuid;
 
        /* App should ensure that it should not send */
-       BT_INFO("### Check on which instance GATT Client instance can be initialized....");
+       BT_INFO("Check on which instance GATT Client instance can be initialized....");
        for (k = 1; k < MAX_APPS_SUPPORTED; k++) {
                if (numapps[k].is_initialized == 1) {
                        BT_INFO("Instance ID [%d] is already in use..Check next slot",