kopia lustrzana https://github.com/espressif/esp-idf
Examples/esp_modem: Reset DCE pointer in DTE on failure
if we failed to init modem so we can e.g. retry later Merges https://github.com/espressif/esp-idf/pull/6727pull/6882/head
rodzic
bc4cb7f67e
commit
2610e9c22d
|
@ -178,6 +178,7 @@ modem_dce_t *bg96_init(modem_dte_t *dte)
|
||||||
return &(esp_modem_dce->parent);
|
return &(esp_modem_dce->parent);
|
||||||
err_io:
|
err_io:
|
||||||
free(esp_modem_dce);
|
free(esp_modem_dce);
|
||||||
|
dte->dce = NULL;
|
||||||
err:
|
err:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,6 +176,7 @@ modem_dce_t *sim800_init(modem_dte_t *dte)
|
||||||
return &(esp_modem_dce->parent);
|
return &(esp_modem_dce->parent);
|
||||||
err_io:
|
err_io:
|
||||||
free(esp_modem_dce);
|
free(esp_modem_dce);
|
||||||
|
dte->dce = NULL;
|
||||||
err:
|
err:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue