From ee2b3dfe4a20a14aa858570fc27dc39374390f85 Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Fri, 25 Sep 2015 14:19:49 +0100 Subject: [PATCH] nRF5xGattServer::write()L remember to setup returnValue to BLE_STACK_BUSY in the case of an unforseen error. --- source/nRF5xGattServer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/nRF5xGattServer.cpp b/source/nRF5xGattServer.cpp index b0aee36..8e4f7fa 100644 --- a/source/nRF5xGattServer.cpp +++ b/source/nRF5xGattServer.cpp @@ -253,6 +253,10 @@ ble_error_t nRF5xGattServer::write(Gap::Handle_t connectionHandle, GattAttribute ASSERT_INT( ERROR_NONE, sd_ble_gatts_value_set(connectionHandle, attributeHandle, &value), BLE_ERROR_PARAM_OUT_OF_RANGE ); + + /* Notifications consume application buffers. The return value can + * be used for resending notifications. */ + returnValue = BLE_STACK_BUSY; break; } }