Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed nRF51822
Diff: TransferService.cpp
- Revision:
- 4:29ae814ca55e
- Parent:
- 3:d58f3a5bd66c
- Child:
- 5:90b73268e270
--- a/TransferService.cpp Tue Sep 02 16:30:18 2014 +0000
+++ b/TransferService.cpp Wed Nov 05 14:35:52 2014 +0000
@@ -71,13 +71,13 @@
void refuseFile();
void sendFileDownloadedSuccessfully();
-void handleDataWritten(uint16_t handle, const GattCharacteristicWriteCBParams *params)
+void handleDataWritten(const GattCharacteristicWriteCBParams *params)
{
if (!ble) {
return;
}
- if (handle == transferFileInfo.getValueAttribute().getHandle()) {
+ if (params->charHandle == transferFileInfo.getValueAttribute().getHandle()) {
if (params->len != sizeof(FileInfo_t)) {
DEBUG("invalid write into fileInfo characteristic\r\n");
return;
@@ -105,7 +105,7 @@
} else {
refuseFile();
}
- } else if (handle == transferFileBlock.getValueAttribute().getHandle()) {
+ } else if (params->charHandle == transferFileBlock.getValueAttribute().getHandle()) {
if (params->len != sizeof(FileBlock_t)) {
DEBUG("invalid write into fileInfo characteristic\r\n");
return;
@@ -123,7 +123,7 @@
DEBUG("Error: block %u is out of range\r\n", fileBlock.blockNumber);
}
} else {
- DEBUG("Got data on unexpected characteristic handle %u!\r\n", handle);
+ DEBUG("Got data on unexpected characteristic handle %u!\r\n", params->charHandle);
}
}