Skip to content

Commit

Permalink
Fix infinite loop on next configuration parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nkljajic committed Feb 13, 2024
1 parent 4d72f4e commit 412c509
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,16 @@ static sl_status_t
if (frame_length >= (current_index + 2)) {
next_id = (configuration_parameter_id_t)((frame[current_index] << 8)
| frame[current_index + 1]);
if (next_id == parameter_id) {
sl_log_debug(LOG_TAG,
"NodeID %d:%d reports that next parameter number %d"
"equals the current one %d, ignoring.",
info->remote.node_id,
info->remote.endpoint_id,
next_id,
parameter_id);
next_id = 0;
}
// Indicate the next parameter to search for:
attribute_store_set_desired(next_id_node, &next_id, sizeof(next_id));
// Set the reported, then undefine it so the resolver tries a new get immediately.
Expand Down Expand Up @@ -1616,4 +1626,4 @@ sl_status_t zwave_command_class_configuration_init()
zwave_command_handler_register_handler(handler);

return SL_STATUS_OK;
}
}

0 comments on commit 412c509

Please sign in to comment.