diff mbox series

[BlueZ] device: unset disconnecting flag when connection is removed

Message ID 20200821062526.16689-1-sonnysasaka@chromium.org (mailing list archive)
State Rejected
Headers show
Series [BlueZ] device: unset disconnecting flag when connection is removed | expand

Commit Message

Sonny Sasaka Aug. 21, 2020, 6:25 a.m. UTC
From: Joseph Hwang <josephsih@chromium.org>

A disconnecting flag has been used to avoid race condition
between the service browsing thread and the disconnecting
thread. We need to unset the flag when connection is removed.

---
 src/device.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

bluez.test.bot@gmail.com Aug. 21, 2020, 6:52 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
While we are preparing for reviewing the patches, we found the following
issue/warning.

Test Result:
checkbuild Failed

Outputs:
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
ar: `u' modifier ignored since `D' is the default (see `U')
src/device.c: In function ‘device_remove_connection’:
src/device.c:3045:3: error: implicit declaration of function ‘set_client_diconnecting’ [-Werror=implicit-function-declaration]
 3045 |   set_client_diconnecting(device->client, false);
      |   ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:9223: src/bluetoothd-device.o] Error 1
make: *** [Makefile:4010: all] Error 2



---
Regards,
Linux Bluetooth
Sonny Sasaka Aug. 21, 2020, 7:11 a.m. UTC | #2
Dear Maintainers,

Please ignore this patch as it is broken. Apologize for the mistake.


On Thu, Aug 20, 2020 at 11:25 PM Sonny Sasaka <sonnysasaka@chromium.org> wrote:
>
> From: Joseph Hwang <josephsih@chromium.org>
>
> A disconnecting flag has been used to avoid race condition
> between the service browsing thread and the disconnecting
> thread. We need to unset the flag when connection is removed.
>
> ---
>  src/device.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/device.c b/src/device.c
> index 7b7808405..5ab591dd4 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -3041,6 +3041,9 @@ void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type)
>                                                         "Paired");
>         }
>
> +       if (device)
> +               set_client_diconnecting(device->client, false);
> +
>         if (device->bredr_state.connected || device->le_state.connected)
>                 return;
>
> --
> 2.26.2
>
diff mbox series

Patch

diff --git a/src/device.c b/src/device.c
index 7b7808405..5ab591dd4 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3041,6 +3041,9 @@  void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type)
 							"Paired");
 	}
 
+	if (device)
+		set_client_diconnecting(device->client, false);
+
 	if (device->bredr_state.connected || device->le_state.connected)
 		return;