fixed typo precenting reads from read/write handler

This commit is contained in:
Morgan 'ARR\!' Allen 2021-09-22 20:15:06 -07:00
parent e3f35e4389
commit 41da70278f

View file

@ -225,7 +225,7 @@ static int barback_ble_char_access(uint16_t conn_handle, uint16_t attr_handle, s
if(access->write != NULL) if(access->write != NULL)
access->write(idx, value); access->write(idx, value);
} else if(ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR) { } else if(ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR) {
if(access->read != NULL) { if(access->read == NULL) {
ESP_LOGW(TAG, "Attempted read without defining access.read"); ESP_LOGW(TAG, "Attempted read without defining access.read");
return 1; return 1;
} }