[PATCH BlueZ] mesh: Add characteristic property name check

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

 



If PropertyChanged signal is not emitted due to a change in
characteristic's "Value" property, the characteristic does
not need to be processed.
---
 mesh/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mesh/main.c b/mesh/main.c
index 42506a6..3a39d8f 100644
--- a/mesh/main.c
+++ b/mesh/main.c
@@ -1295,8 +1295,9 @@ static void property_changed(GDBusProxy *proxy, const char *name,
 		rl_printf("Characteristic property changed %s\n",
 						g_dbus_proxy_get_path(proxy));
 
-		if ((connection.type == CONN_TYPE_PROVISION) ||
-							connection.session_open)
+		if ((strcmp(name, "Value") == 0) &&
+				((connection.type == CONN_TYPE_PROVISION) ||
+						connection.session_open))
 			process_mesh_characteristic(proxy);
 	}
 }
-- 
2.9.5

--
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