* [PATCH BlueZ] mesh: Fix lookup of non-vendor models in node config
@ 2020-08-11 20:07 Michał Lowas-Rzechonek
0 siblings, 0 replies; only message in thread
From: Michał Lowas-Rzechonek @ 2020-08-11 20:07 UTC (permalink / raw)
To: linux-bluetooth
In commit 81a0868b082c ("mesh: Move model functionality out of node.c
to model.c"), we changed the way we handle model ids, resulting
in vendor mask not being stripped from model id before update_bindings()
calls mesh_config_model_binding_*().
This resulted in get_element_model not finding the model.
---
mesh/mesh-config-json.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/mesh/mesh-config-json.c b/mesh/mesh-config-json.c
index ae1099fcb..ce8dd5cde 100644
--- a/mesh/mesh-config-json.c
+++ b/mesh/mesh-config-json.c
@@ -170,11 +170,6 @@ static json_object *get_element_model(json_object *jnode, int ele_idx,
size_t len;
char buf[9];
- if (!vendor)
- snprintf(buf, 5, "%4.4x", (uint16_t)mod_id);
- else
- snprintf(buf, 9, "%8.8x", mod_id);
-
if (!json_object_object_get_ex(jnode, "elements", &jelements))
return NULL;
@@ -190,7 +185,7 @@ static json_object *get_element_model(json_object *jnode, int ele_idx,
return NULL;
if (!vendor) {
- snprintf(buf, 5, "%4.4x", mod_id);
+ snprintf(buf, 5, "%4.4x", (uint16_t)mod_id);
len = 4;
} else {
snprintf(buf, 9, "%8.8x", mod_id);
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-08-11 20:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 20:07 [PATCH BlueZ] mesh: Fix lookup of non-vendor models in node config Michał Lowas-Rzechonek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.