From 41da70278f684cf1a480e4d13181dd9ac37d85c8 Mon Sep 17 00:00:00 2001 From: "Morgan 'ARR\\!' Allen" Date: Wed, 22 Sep 2021 20:15:06 -0700 Subject: [PATCH] fixed typo precenting reads from read/write handler --- main/ble.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/ble.c b/main/ble.c index da40861..eba7a83 100644 --- a/main/ble.c +++ b/main/ble.c @@ -225,7 +225,7 @@ static int barback_ble_char_access(uint16_t conn_handle, uint16_t attr_handle, s if(access->write != NULL) access->write(idx, value); } 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"); return 1; }