linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] mesh: Remove StopNotify method to avoid reading data twice on some mesh nodes
@ 2017-09-08 12:30 Laczen JMS
  2017-09-08 13:47 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: Laczen JMS @ 2017-09-08 12:30 UTC (permalink / raw)
  To: linux-bluetooth

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.

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,

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-08 22:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-08 12:30 [PATCH 1/1] mesh: Remove StopNotify method to avoid reading data twice on some mesh nodes Laczen JMS
2017-09-08 13:47 ` Luiz Augusto von Dentz
2017-09-08 13:55   ` Luiz Augusto von Dentz
2017-09-08 14:25   ` Laczen JMS
2017-09-08 22:29     ` Stotland, Inga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).