btproxy: Allow to select multiple BT controllers
authorFrédéric Danis <frederic.danis@collabora.com>
Fri, 3 Jun 2022 14:54:47 +0000 (16:54 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit8229ba188f857c912251b220a00e787c44e08ea9
tree87ed4ef10f545a0f0690932328713304e796f84e
parentfa458577bba8e65400e11ca51966ab48c7092652
btproxy: Allow to select multiple BT controllers

When running on a computer with a real Bluetooth controller (e.g. hci0) and
multiple emulators (e.g. hci1 and hci2) it isn't possible to use the
emulators with 2 test-runner vms.
If btproxy is started without index parameter the first test-runner will
use hci0, and btprox can't be started with multiple index parameters
(e.g. -i1 -i2).

This patch keeps the old beahvior when used without -i option, in this case
it will try to use the first controller available.
It also allows to select multiple controllers to be used by btproxy.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/btproxy.c