High level Bluetooth Low Energy API and radio abstraction layer

Fork of BLE_API by Bluetooth Low Energy

Revision:
1182:b70129080ddf
Parent:
1180:e11b058d005e
Child:
1183:1589830dbdb7
--- a/ble/Gap.h	Wed Apr 06 19:15:33 2016 +0100
+++ b/ble/Gap.h	Wed Apr 06 19:15:34 2016 +0100
@@ -741,8 +741,12 @@
      * Start advertising.
      */
     ble_error_t startAdvertising(void) {
+        ble_error_t rc;
         setAdvertisingData(); /* Update the underlying stack. */
-        return startAdvertising(_advParams);
+        if ((rc = startAdvertising(_advParams)) == BLE_ERROR_NONE) {
+            state.advertising = 1;
+        }
+        return rc;
     }
 
     /**