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.
Fork of nRF51822 by
Revision 30:85305292b44f, committed 2014-06-11
- Comitter:
- Rohit Grover
- Date:
- Wed Jun 11 14:52:13 2014 +0100
- Parent:
- 29:cee837a465a1
- Child:
- 31:c3ce6ee5d300
- Commit message:
- introduce some sanity checks before adding a characteristic's value to BLE stack
Changed in this revision
| nRF51GattServer.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/nRF51GattServer.cpp Wed Jun 11 14:44:16 2014 +0100
+++ b/nRF51GattServer.cpp Wed Jun 11 14:52:13 2014 +0100
@@ -77,7 +77,9 @@
p_characteristics[characteristicCount++] = p_char;
p_char->setHandle(charHandle);
- updateValue(charHandle, p_char->getValuePtr(), p_char->getInitialLength(), false /* localOnly */);
+ if ((p_char->getValuePtr() != NULL) && (p_char->getInitialLength() > 0)) {
+ updateValue(charHandle, p_char->getValuePtr(), p_char->getInitialLength(), false /* localOnly */);
+ }
}
serviceCount++;
