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 61:057be2a0cd38, committed 2014-09-03
- Comitter:
- janekm
- Date:
- Wed Sep 03 17:19:53 2014 +0000
- Parent:
- 60:e861f2041469
- Commit message:
- Fix disconnection notification to application (used to only notify on locally initiated disconnection)
Changed in this revision
btle/btle.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e861f2041469 -r 057be2a0cd38 btle/btle.cpp --- a/btle/btle.cpp Tue Sep 02 17:01:18 2014 +0100 +++ b/btle/btle.cpp Wed Sep 03 17:19:53 2014 +0000 @@ -139,6 +139,10 @@ if (p_ble_evt->evt.gap_evt.params.disconnected.reason == BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION) { nRF51Gap::getInstance().processDisconnectionEvent(handle, Gap::LOCAL_HOST_TERMINATED_CONNECTION); + } else if (p_ble_evt->evt.gap_evt.params.disconnected.reason == BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION) { + nRF51Gap::getInstance().processDisconnectionEvent(handle, Gap::REMOTE_USER_TERMINATED_CONNECTION); + } else { + nRF51Gap::getInstance().processDisconnectionEvent(handle, Gap::CONN_INTERVAL_UNACCEPTABLE); } break; }