Bluetooth: GATT: Fix not canceling on unsubscribe

This introduces a new flag (BT_GATT_SUBSCRIBE_WRITE_PENDING) which is
set when a write operation requires canceling before the parameters can
be reused.

Fixes #17534

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2019-07-16 18:17:07 +03:00 committed by Carles Cufí
commit 219bb6fe1f
2 changed files with 15 additions and 0 deletions

View file

@ -1228,6 +1228,13 @@ enum {
* issue a new subscription.
*/
BT_GATT_SUBSCRIBE_FLAG_VOLATILE = BIT(0),
/** Write pending flag
*
* If set, indicates write operation is pending waiting remote end to
* respond.
*/
BT_GATT_SUBSCRIBE_WRITE_PENDING = BIT(1),
};
/** @brief GATT Subscribe parameters */