openthread / ot-commissioner

OpenThread Commissioner, a Thread commissioner for joining new Thread devices and managing Thread networks.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
49 stars 36 forks source link

[dataset] avoid setting session ID or Border Agent Locator #212

Closed wgtdkp closed 3 years ago

wgtdkp commented 3 years ago

Commissioner Session ID and Border Agent Locator in the Commissioner Dataset are read-only. Current implementation rejects setting the Commissioner Dataset if any of the fields is present, but it is not convenient for the caller to manually clear out those fields. This commits change the implementation to always clear out the Commissioner Session ID and Border Agent Locator fields before sending the MGMT_COMM_SET.req message to the border agent.

Fixes master CI failure https://github.com/openthread/ot-commissioner/runs/2861632149.

codecov-commenter commented 3 years ago

Codecov Report

Merging #212 (0ec2834) into main (4ba3360) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #212      +/-   ##
==========================================
+ Coverage   68.88%   68.91%   +0.02%     
==========================================
  Files          55       55              
  Lines        4934     4938       +4     
==========================================
+ Hits         3399     3403       +4     
  Misses       1535     1535              
Impacted Files Coverage Δ
src/app/commissioner_app.cpp 39.93% <100.00%> (+0.28%) :arrow_up:
src/library/commissioner_impl.cpp 76.35% <100.00%> (+0.02%) :arrow_up: