drivers/nble: Pass correct handle in bt_gatt_notify
Change-Id: I90d85e681e4274722ed94dce839287e5868a93af Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
7d91d3331f
commit
7dc5596de7
1 changed files with 8 additions and 1 deletions
|
@ -15,11 +15,13 @@
|
|||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <atomic.h>
|
||||
#include <misc/byteorder.h>
|
||||
|
||||
#include <bluetooth/gatt.h>
|
||||
#include <bluetooth/log.h>
|
||||
|
||||
#include "conn_internal.h"
|
||||
#include "gatt_internal.h"
|
||||
|
||||
#define NBLE_BUF_SIZE 384
|
||||
|
@ -354,7 +356,12 @@ int bt_gatt_notify(struct bt_conn *conn, const struct bt_gatt_attr *attr,
|
|||
{
|
||||
struct ble_gatt_send_notif_ind_params notif;
|
||||
|
||||
notif.conn_handle = 0xFFFF;
|
||||
if (conn) {
|
||||
notif.conn_handle = conn->handle;
|
||||
} else {
|
||||
notif.conn_handle = 0xffff;
|
||||
}
|
||||
|
||||
notif.params.attr = (struct bt_gatt_attr *)attr;
|
||||
notif.params.offset = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue