From: alarruskain Date: Fri, 17 Feb 2017 10:02:00 +0000 (+0100) Subject: lwip: Fix hostname set in tcpip_adapter_lwip X-Git-Tag: v2.1-rc1~284^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3119f936abac87e522fc03a947e087528aeaa955;p=esp-idf lwip: Fix hostname set in tcpip_adapter_lwip Hostname for each interface is not correctly stored in "hostinfo" variable. Merges #350 https://github.com/espressif/esp-idf/pull/350 --- diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c index 40f235d545..6e16617547 100644 --- a/components/tcpip_adapter/tcpip_adapter_lwip.c +++ b/components/tcpip_adapter/tcpip_adapter_lwip.c @@ -713,7 +713,7 @@ esp_err_t tcpip_adapter_set_hostname(tcpip_adapter_if_t tcpip_if, const char *ho { #if LWIP_NETIF_HOSTNAME struct netif *p_netif; - static char hostinfo[TCPIP_HOSTNAME_MAX_SIZE + 1][TCPIP_ADAPTER_IF_MAX]; + static char hostinfo[TCPIP_ADAPTER_IF_MAX][TCPIP_HOSTNAME_MAX_SIZE + 1]; if (tcpip_if >= TCPIP_ADAPTER_IF_MAX || hostname == NULL) { return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS;