Skip to content

Commit 9631cd1

Browse files
sjancjhedberg
authored andcommitted
Bluetooth: OTS: Fix calling obj_created callback with NULL conn
Callback was always called with NULL conn. Now it is called with proper pointer or NULL conforming to description. Signed-off-by: Szymon Janc <[email protected]>
1 parent b781144 commit 9631cd1

File tree

1 file changed

+1
-1
lines changed
  • subsys/bluetooth/services/ots

1 file changed

+1
-1
lines changed

subsys/bluetooth/services/ots/ots.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ int bt_ots_obj_add_internal(struct bt_ots *ots, struct bt_conn *conn,
318318
(void)memset(&created_desc, 0, sizeof(created_desc));
319319

320320
if (ots->cb->obj_created) {
321-
err = ots->cb->obj_created(ots, NULL, new_obj->id, param, &created_desc);
321+
err = ots->cb->obj_created(ots, conn, new_obj->id, param, &created_desc);
322322

323323
if (err) {
324324
(void)bt_gatt_ots_obj_manager_obj_delete(new_obj);

0 commit comments

Comments
 (0)