For with fix for disconnection notifications

Fork of nRF51822 by Nordic Semiconductor

Revision:
29:cee837a465a1
Parent:
28:fdc1a88a80c8
Child:
30:85305292b44f
--- a/nRF51GattServer.cpp	Wed Jun 11 13:55:00 2014 +0100
+++ b/nRF51GattServer.cpp	Wed Jun 11 14:44:16 2014 +0100
@@ -47,11 +47,14 @@
     /* Add the service to the nRF51 */
     ble_uuid_t nordicUUID;
     nordicUUID = custom_convert_to_nordic_uuid(service.getUUID());
+
+    uint16_t serviceHandle;
     ASSERT( ERROR_NONE ==
             sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY,
                                      &nordicUUID,
-                                     service.getHandlePtr()),
+                                     &serviceHandle),
             BLE_ERROR_PARAM_OUT_OF_RANGE );
+    service.setHandle(serviceHandle);
 
     /* Add characteristics to the service */
     for (uint8_t i = 0; i < service.getCharacteristicCount(); i++) {