Re: [PATCH BlueZ 1/3] adapter: Fix not waiting for start discovery result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx> writes:

> From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
>
> We should not reply until the start discovery completes otherwise
> clients may attempt to stop the discovery before it even has started.
>
> On top of this it will now block clients so they so not be able to
> queue more requests.
> ---
>  src/adapter.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++--------
>  1 file changed, 47 insertions(+), 8 deletions(-)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index a571b1870..4b9f5a1cd 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -160,6 +160,7 @@ struct discovery_filter {
>
>  struct watch_client {
>  	struct btd_adapter *adapter;
> +	DBusMessage *msg;
>  	char *owner;
>  	guint watch;
>  	struct discovery_filter *discovery_filter;
> @@ -1421,13 +1422,17 @@ static void start_discovery_complete(uint8_t status, uint16_t length,
>  					const void *param, void *user_data)
>  {
>  	struct btd_adapter *adapter = user_data;
> +	struct watch_client *client = adapter->discovery_list->data;

What if the client exits the bus after issuing StartDiscovery(), but
before receiving the reply. It seems that 'adapter->discovery_list'
could be empty, no?


Cheers,
--
Vinicius
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux