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>
1 file changed