From 861a976eee96d9bf65d7b819c41b90afe6d439c7 Mon Sep 17 00:00:00 2001 From: Wu Jian Gang Date: Thu, 1 Sep 2016 15:11:23 +0800 Subject: [PATCH] tcpip_adapter: fix a typo --- .../tcpip_adapter/include/tcpip_adapter.h | 6 ++--- components/tcpip_adapter/tcpip_adapter_lwip.c | 26 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/components/tcpip_adapter/include/tcpip_adapter.h b/components/tcpip_adapter/include/tcpip_adapter.h index de81c9400c..76f10d7759 100644 --- a/components/tcpip_adapter/include/tcpip_adapter.h +++ b/components/tcpip_adapter/include/tcpip_adapter.h @@ -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; diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c index cbf88bde4d..3cd6965bd0 100644 --- a/components/tcpip_adapter/tcpip_adapter_lwip.c +++ b/components/tcpip_adapter/tcpip_adapter_lwip.c @@ -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; }