mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/use_default_dataset_if_exist' into 'master'
fix(openthread): try to use a existing dataset when autostart See merge request espressif/esp-idf!24976
This commit is contained in:
commit
8646abed3a
@ -71,7 +71,9 @@ static void ot_task_worker(void *aContext)
|
||||
|
||||
#if CONFIG_OPENTHREAD_BR_AUTO_START
|
||||
ESP_ERROR_CHECK(esp_openthread_border_router_init());
|
||||
ESP_ERROR_CHECK(esp_openthread_auto_start(NULL));
|
||||
otOperationalDatasetTlvs dataset;
|
||||
otError error = otDatasetGetActiveTlvs(esp_openthread_get_instance(), &dataset);
|
||||
ESP_ERROR_CHECK(esp_openthread_auto_start((error == OT_ERROR_NONE) ? &dataset : NULL));
|
||||
#endif // CONFIG_OPENTHREAD_BR_AUTO_START
|
||||
|
||||
esp_cli_custom_command_init();
|
||||
|
Loading…
Reference in New Issue
Block a user