just a fork
Fork of BLE_API by
Diff: ble/Gap.h
- Revision:
- 1190:38d206267ad3
- Parent:
- 1189:740911150041
- Child:
- 1191:c8635748feec
diff -r 740911150041 -r 38d206267ad3 ble/Gap.h --- a/ble/Gap.h Wed Apr 06 19:15:43 2016 +0100 +++ b/ble/Gap.h Wed Apr 06 19:15:44 2016 +0100 @@ -1118,12 +1118,11 @@ */ ble_error_t setAdvertisingPayload(const GapAdvertisingData &payload) { ble_error_t rc = setAdvertisingData(_advPayload, _scanResponse); - if (rc != BLE_ERROR_NONE) { - /* The payload has a problem, do not store it */ - return rc; + if (rc == BLE_ERROR_NONE) { + _advPayload = payload; } - _advPayload = payload; - return BLE_ERROR_NONE; + + return rc; } /**