When an instance wants to force being discoverable the code shall
actually check if the adapter is in general disverable mode already and
if not set BR/EDR as not supported so that devices scanning don't
assume BR/EDR PHY is connectable when in fact it isn't.
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
dbus_message_iter_get_basic(iter, &discoverable);
- if (discoverable)
- flags = 0x02;
- else
+ if (discoverable) {
+ /* Set BR/EDR Not Supported if adapter is no discoverable */
+ if (!btd_adapter_get_discoverable(client->manager->adapter))
+ flags = 0x04;
+ flags |= 0x02;
+ } else
flags = 0x00;
if (!set_flags(client , flags))