diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2016-02-17 14:03:20 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2016-02-17 15:05:34 +0000 |
commit | a72d967d338af41bca90da7d5046de9e89d6ab96 (patch) | |
tree | 9b155924c02573646a10dfb3153ae85dd85192e7 /samples/bluetooth/peripheral_csc/src/main.c | |
parent | 15ac9992a9a10ef2ccc511c0fbaa1d21661c3e7b (diff) |
Bluetooth: GATT: Expose ATT error codes to application callbacks
Introduce BT_GATT_ERR macro to make it possible for application
callbacks to return exact ATT error codes.
Change-Id: I971536508e75036fbddc40b3f33e5201e11940bc
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'samples/bluetooth/peripheral_csc/src/main.c')
-rw-r--r-- | samples/bluetooth/peripheral_csc/src/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/samples/bluetooth/peripheral_csc/src/main.c b/samples/bluetooth/peripheral_csc/src/main.c index eeaa28055..04f985f67 100644 --- a/samples/bluetooth/peripheral_csc/src/main.c +++ b/samples/bluetooth/peripheral_csc/src/main.c @@ -238,12 +238,11 @@ static int write_ctrl_point(struct bt_conn *conn, int i; if (!ctrl_point_configured) { - /* TODO: Return CSC_ERR_CCC_CONFIG */ - return -EINVAL; + return BT_GATT_ERR(CSC_ERR_CCC_CONFIG); } if (!len) { - return -EINVAL; + return BT_GATT_ERR(BT_ATT_ERR_INVALID_ATTRIBUTE_LEN); } switch (req->op) { |