device: Fix not handling initiator properly
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 11 Sep 2023 22:30:01 +0000 (15:30 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 13:34:04 +0000 (19:04 +0530)
commit5dead2dcaab438095f4885eed19250d173ba64c9
treefcf35609179ed56c4195bea407c35a1f522bdad0
parent017a91f7e97297654122005eb78092a64081a3c9
device: Fix not handling initiator properly

Previously initiator would be set whenever a central key was found
which turns out to be unreliable besides the MGMT New Connection event
does in fact inform if the connection was initiated locally or not.

Fixes: https://github.com/bluez/bluez/issues/598
src/adapter.c
src/device.c
src/device.h