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:
Johan Hedberg 2016-02-10 12:16:59 +02:00 committed by Anas Nashif
commit 7dc5596de7

View file

@ -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;