mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix proto cmd crash problem in iperf example
This commit is contained in:
parent
196fc559b4
commit
a09b89b36d
@ -670,6 +670,10 @@ static int wifi_cmd_proto(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
wifi_mode_t mode;
|
wifi_mode_t mode;
|
||||||
esp_wifi_get_mode(&mode);
|
esp_wifi_get_mode(&mode);
|
||||||
|
if(WIFI_MODE_NULL == mode) {
|
||||||
|
ESP_LOGI(TAG, "current wifi mode is null");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
int ifx = (WIFI_MODE_STA == mode) ? 0 : 1;
|
int ifx = (WIFI_MODE_STA == mode) ? 0 : 1;
|
||||||
if (proto_args.proto->count) {
|
if (proto_args.proto->count) {
|
||||||
if (!strcmp(proto_args.proto->sval[0], "ax")) {
|
if (!strcmp(proto_args.proto->sval[0], "ax")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user