Re: [PATCH 1/1] mesh: Remove StopNotify method to avoid reading data twice on some mesh nodes

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

 



Hi Jehudi,

On Fri, Sep 8, 2017 at 3:30 PM, Laczen JMS <laczenjms@xxxxxxxxx> wrote:
> Some mesh nodes do not change (e.g. zephyr) the notification when
> given the StopNotify. As a result the data from the notification
> channel is processed twice. This patch removes the StopNotify.

What do you mean the node do not change? Perhaps this is the result of
bluetoothd remembering the subscriptions so you don't have to
StopNotify while disconnected, though this should not cause the data
to be processed twice otherwise we have a bug somewhere in the daemon.

> Kind regards,
>
> Jehudi
>
>   diff --git a/mesh/gatt.c b/mesh/gatt.c
> index f9615b3..7d3b869 100644
> --- a/mesh/gatt.c
> +++ b/mesh/gatt.c
> @@ -589,15 +589,10 @@ bool mesh_gatt_notify(GDBusProxy *proxy, bool
> enable, GDBusReturnFunction cb,
>   cb = notify_reply;
>   }
>   } else {
> - if (notify_io) {
> - notify_io_destroy();
> - if (cb)
> - cb(NULL, user_data);
> - return true;
> - } else {
> - method = "StopNotify";
> - cb = notify_reply;
> - }
> + if (notify_io) notify_io_destroy();
> + if (cb) cb(NULL, user_data);
> +
> + return true;
>   }
>
>   if (g_dbus_proxy_method_call(proxy, method, NULL, cb,
> --
> 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



-- 
Luiz Augusto von Dentz
--
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