Bluetooth: services: Do not set current object until selected
Do not make the first object added to the object transfer server the current (=selected object). This leads to the server having no current object until one is selected by the client. This solves a startup issue where the selected callback is not called by the server if the first object selected by the client happens to be the same object as the object that was first added to the server. In that case, the user of the OTS does not know which object is selected, and therefore may not be able to supply the correct data later. Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
This commit is contained in:
parent
3dd65a7663
commit
22068d4967
1 changed files with 0 additions and 5 deletions
|
@ -202,11 +202,6 @@ int bt_ots_obj_add(struct bt_ots *ots,
|
|||
}
|
||||
}
|
||||
|
||||
/* Make object the Current Object if this is the first one added. */
|
||||
if (!ots->cur_obj) {
|
||||
ots->cur_obj = obj;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue