bugfixes & use new lwip mempool for FreeRTOS lwip
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
#include "app_dhcp.h"
|
||||
|
||||
#include "OBSWConfig.h"
|
||||
#include "app_ethernet.h"
|
||||
#include "ethernetif.h"
|
||||
#include "lwip/dhcp.h"
|
||||
#include "networking.h"
|
||||
#include "stm32h7xx_nucleo.h"
|
||||
@ -24,7 +22,7 @@ void handle_dhcp_down(struct netif *netif);
|
||||
* @retval None
|
||||
*/
|
||||
void DHCP_Process(struct netif *netif) {
|
||||
struct dhcp *dhcp = NULL;
|
||||
struct dhcp *dhcp = nullptr;
|
||||
switch (DHCP_state) {
|
||||
case DHCP_START: {
|
||||
handle_dhcp_start(netif);
|
||||
@ -119,8 +117,8 @@ void handle_dhcp_wait(struct netif *netif, struct dhcp **dhcp) {
|
||||
#endif
|
||||
#endif
|
||||
} else {
|
||||
*dhcp = (struct dhcp *)netif_get_client_data(
|
||||
netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP);
|
||||
*dhcp = static_cast<struct dhcp *>(netif_get_client_data(
|
||||
netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP));
|
||||
|
||||
/* DHCP timeout */
|
||||
if ((*dhcp)->tries > MAX_DHCP_TRIES) {
|
||||
@ -130,6 +128,7 @@ void handle_dhcp_wait(struct netif *netif, struct dhcp **dhcp) {
|
||||
}
|
||||
|
||||
void handle_dhcp_down(struct netif *netif) {
|
||||
static_cast<void>(netif);
|
||||
DHCP_state = DHCP_OFF;
|
||||
#if OBSW_ETHERNET_TMTC_COMMANDING == 1
|
||||
printf("DHCP_Process: The network cable is not connected.\n\r");
|
||||
|
Reference in New Issue
Block a user