summaryrefslogtreecommitdiff
path: root/mesh/cfgmod-server.c
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@intel.com>2020-08-11 10:18:55 -0700
committerBrian Gix <brian.gix@intel.com>2020-08-11 11:09:56 -0700
commit14b109f1fb89589c7af4761951e8640d43a15bc4 (patch)
treed09ee7dd3be845558267354f3ad5c208f0095461 /mesh/cfgmod-server.c
parentd3691ce6b02bf32c02b7a68b20c605f3e60da559 (diff)
downloadbluez-14b109f1fb89589c7af4761951e8640d43a15bc4.tar.gz
mesh: Fix logic error when saving model subscriptions
This fixes opcode check condition when saving configuration for model subscriptions: use || instead of && for opcode checking
Diffstat (limited to 'mesh/cfgmod-server.c')
-rw-r--r--mesh/cfgmod-server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesh/cfgmod-server.c b/mesh/cfgmod-server.c
index d31c8d99f..9da981700 100644
--- a/mesh/cfgmod-server.c
+++ b/mesh/cfgmod-server.c
@@ -211,7 +211,7 @@ static bool save_cfg_sub(struct mesh_node *node, uint16_t ele_addr,
if (virt)
memcpy(db_sub.addr.label, label, 16);
- if (opcode == OP_CONFIG_MODEL_SUB_VIRT_DELETE &&
+ if (opcode == OP_CONFIG_MODEL_SUB_VIRT_DELETE ||
opcode == OP_CONFIG_MODEL_SUB_DELETE)
return mesh_config_model_sub_del(cfg, ele_addr, id, vendor,
&db_sub);