Skip to content

Commit

Permalink
[otci] add the parameter wakeup channel to the method create_dataset (o…
Browse files Browse the repository at this point in the history
…penthread#10898)

The parameters of the method dataset_set_buffer() has been updated, but the
method create_dataset() still use previous defination of dataset_set_buffer().
It causes the crash when calling the method create_dataset().
  • Loading branch information
zhanglongxia authored Nov 7, 2024
1 parent d0998be commit 0fb1c22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/otci/otci/otci.py
Original file line number Diff line number Diff line change
Expand Up @@ -2723,12 +2723,13 @@ def create_dataset(self,
panid: Optional[int] = None,
pskc: Optional[str] = None,
security_policy: Optional[tuple] = None,
pending_timestamp: Optional[int] = None) -> bytes:
pending_timestamp: Optional[int] = None,
wakeup_channel: Optional[int] = None) -> bytes:
"""Creates a new Operational Dataset with given parameters."""
self.dataset_clear_buffer()
self.dataset_init_buffer()
self.dataset_set_buffer(active_timestamp, channel, channel_mask, extpanid, mesh_local_prefix, network_key,
network_name, panid, pskc, security_policy, pending_timestamp)
self.dataset_set_buffer(active_timestamp, channel, wakeup_channel, channel_mask, extpanid, mesh_local_prefix,
network_key, network_name, panid, pskc, security_policy, pending_timestamp)
return self.get_dataset_tlvs_bytes()

def join(self, dataset: bytes) -> None:
Expand Down

0 comments on commit 0fb1c22

Please sign in to comment.