From 1922f6cd8066b9cffc4adc260d35e44d9040ed11 Mon Sep 17 00:00:00 2001 From: Siarhei Volkau Date: Sat, 1 Jul 2017 13:12:22 +0300 Subject: [PATCH] using param, which corresponds to handled event In the handlers of ESP_GATTS_ADD_CHAR_DESCR_EVT was used incorrect parameter, which corresponding to ESP_GATTS_ADD_CHAR_EVT. --- examples/bluetooth/gatt_server/main/gatts_demo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bluetooth/gatt_server/main/gatts_demo.c b/examples/bluetooth/gatt_server/main/gatts_demo.c index edbe743947..a29676cd17 100644 --- a/examples/bluetooth/gatt_server/main/gatts_demo.c +++ b/examples/bluetooth/gatt_server/main/gatts_demo.c @@ -457,7 +457,7 @@ static void gatts_profile_a_event_handler(esp_gatts_cb_event_t event, esp_gatt_i case ESP_GATTS_ADD_CHAR_DESCR_EVT: gl_profile_tab[PROFILE_A_APP_ID].descr_handle = param->add_char.attr_handle; ESP_LOGI(GATTS_TAG, "ADD_DESCR_EVT, status %d, attr_handle %d, service_handle %d\n", - param->add_char.status, param->add_char.attr_handle, param->add_char.service_handle); + param->add_char_descr.status, param->add_char_descr.attr_handle, param->add_char_descr.service_handle); break; case ESP_GATTS_DELETE_EVT: break; @@ -610,7 +610,7 @@ static void gatts_profile_b_event_handler(esp_gatts_cb_event_t event, esp_gatt_i case ESP_GATTS_ADD_CHAR_DESCR_EVT: gl_profile_tab[PROFILE_B_APP_ID].descr_handle = param->add_char.attr_handle; ESP_LOGI(GATTS_TAG, "ADD_DESCR_EVT, status %d, attr_handle %d, service_handle %d\n", - param->add_char.status, param->add_char.attr_handle, param->add_char.service_handle); + param->add_char_descr.status, param->add_char_descr.attr_handle, param->add_char_descr.service_handle); break; case ESP_GATTS_DELETE_EVT: break;