mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
tcpip_adapter: fix a typo
This commit is contained in:
parent
e2b4421629
commit
861a976eee
@ -57,9 +57,9 @@ struct station_list {
|
||||
#define ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY ESP_ERR_TCPIP_ADAPTER_BASE + 0x01
|
||||
#define ESP_ERR_TCPIP_ADAPTER_DHCPC_START_FAILED ESP_ERR_TCPIP_ADAPTER_BASE + 0x02
|
||||
#define ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STARTED ESP_ERR_TCPIP_ADAPTER_BASE + 0x03
|
||||
#define ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPED ESP_ERR_TCPIP_ADAPTER_BASE + 0x04
|
||||
#define ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPPED ESP_ERR_TCPIP_ADAPTER_BASE + 0x04
|
||||
#define ESP_ERR_TCPIP_ADAPTER_NO_MEM ESP_ERR_TCPIP_ADAPTER_BASE + 0x05
|
||||
#define ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPED ESP_ERR_TCPIP_ADAPTER_BASE + 0x06
|
||||
#define ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPPED ESP_ERR_TCPIP_ADAPTER_BASE + 0x06
|
||||
|
||||
/* will add ethernet interface */
|
||||
typedef enum {
|
||||
@ -71,7 +71,7 @@ typedef enum {
|
||||
typedef enum {
|
||||
TCPIP_ADAPTER_DHCP_INIT = 0,
|
||||
TCPIP_ADAPTER_DHCP_STARTED,
|
||||
TCPIP_ADAPTER_DHCP_STOPED,
|
||||
TCPIP_ADAPTER_DHCP_STOPPED,
|
||||
TCPIP_ADAPTER_DHCP_STATUS_MAX
|
||||
} tcpip_adapter_dhcp_status_t;
|
||||
|
||||
|
@ -154,7 +154,7 @@ esp_err_t tcpip_adapter_down(tcpip_adapter_if_t tcpip_if)
|
||||
dhcp_stop(esp_netif[tcpip_if]);
|
||||
dhcp_cleanup(esp_netif[tcpip_if]);
|
||||
|
||||
if (dhcpc_status != TCPIP_ADAPTER_DHCP_STOPED) {
|
||||
if (dhcpc_status != TCPIP_ADAPTER_DHCP_STOPPED) {
|
||||
dhcpc_status = TCPIP_ADAPTER_DHCP_INIT;
|
||||
}
|
||||
}
|
||||
@ -250,14 +250,14 @@ esp_err_t tcpip_adapter_set_ip_info(tcpip_adapter_if_t tcpip_if, struct ip_info
|
||||
if (tcpip_if == TCPIP_ADAPTER_IF_AP) {
|
||||
tcpip_adapter_dhcps_get_status(tcpip_if, &status);
|
||||
|
||||
if (status != TCPIP_ADAPTER_DHCP_STOPED) {
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPED;
|
||||
if (status != TCPIP_ADAPTER_DHCP_STOPPED) {
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPPED;
|
||||
}
|
||||
} else if (tcpip_if == TCPIP_ADAPTER_IF_STA) {
|
||||
tcpip_adapter_dhcpc_get_status(tcpip_if, &status);
|
||||
|
||||
if (status != TCPIP_ADAPTER_DHCP_STOPED) {
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPED;
|
||||
if (status != TCPIP_ADAPTER_DHCP_STOPPED) {
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_NOT_STOPPED;
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,8 +323,8 @@ esp_err_t tcpip_adapter_dhcps_option(tcpip_adapter_option_mode opt_op, tcpip_ada
|
||||
}
|
||||
|
||||
if (opt_op == TCPIP_ADAPTER_OP_GET) {
|
||||
if (dhcps_status == TCPIP_ADAPTER_DHCP_STOPED) {
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPED;
|
||||
if (dhcps_status == TCPIP_ADAPTER_DHCP_STOPPED) {
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPPED;
|
||||
}
|
||||
|
||||
switch (opt_id) {
|
||||
@ -460,13 +460,13 @@ esp_err_t tcpip_adapter_dhcps_stop(tcpip_adapter_if_t tcpip_if)
|
||||
TCPIP_ADAPTER_DEBUG("dhcp server if not ready\n");
|
||||
return ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY;
|
||||
}
|
||||
} else if (dhcps_status == TCPIP_ADAPTER_DHCP_STOPED) {
|
||||
} else if (dhcps_status == TCPIP_ADAPTER_DHCP_STOPPED) {
|
||||
TCPIP_ADAPTER_DEBUG("dhcp server already stoped\n");
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPED;
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPPED;
|
||||
}
|
||||
|
||||
TCPIP_ADAPTER_DEBUG("dhcp server stop successfully\n");
|
||||
dhcps_status = TCPIP_ADAPTER_DHCP_STOPED;
|
||||
dhcps_status = TCPIP_ADAPTER_DHCP_STOPPED;
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@ -542,13 +542,13 @@ esp_err_t tcpip_adapter_dhcpc_stop(tcpip_adapter_if_t tcpip_if)
|
||||
TCPIP_ADAPTER_DEBUG("dhcp client if not ready\n");
|
||||
return ESP_ERR_TCPIP_ADAPTER_IF_NOT_READY;
|
||||
}
|
||||
} else if (dhcpc_status == TCPIP_ADAPTER_DHCP_STOPED) {
|
||||
} else if (dhcpc_status == TCPIP_ADAPTER_DHCP_STOPPED) {
|
||||
TCPIP_ADAPTER_DEBUG("dhcp client already stoped\n");
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPED;
|
||||
return ESP_ERR_TCPIP_ADAPTER_DHCP_ALREADY_STOPPED;
|
||||
}
|
||||
|
||||
TCPIP_ADAPTER_DEBUG("dhcp client stop successfully\n");
|
||||
dhcpc_status = TCPIP_ADAPTER_DHCP_STOPED;
|
||||
dhcpc_status = TCPIP_ADAPTER_DHCP_STOPPED;
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user