mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/suppress_dhcpserver_debug_output' into 'master'
dhcpserver: suppress send_nak debug output Closes IDFGH-557 See merge request idf/esp-idf!4491
This commit is contained in:
commit
8e4b82548a
@ -553,7 +553,9 @@ static void send_nak(struct dhcps_msg *m, u16_t len)
|
|||||||
u8_t *data;
|
u8_t *data;
|
||||||
u16_t cnt = 0;
|
u16_t cnt = 0;
|
||||||
u16_t i;
|
u16_t i;
|
||||||
|
#if DHCPS_DEBUG
|
||||||
err_t SendNak_err_t;
|
err_t SendNak_err_t;
|
||||||
|
#endif
|
||||||
create_msg(m);
|
create_msg(m);
|
||||||
|
|
||||||
end = add_msg_type(&m->options[4], DHCPNAK);
|
end = add_msg_type(&m->options[4], DHCPNAK);
|
||||||
@ -600,8 +602,12 @@ static void send_nak(struct dhcps_msg *m, u16_t len)
|
|||||||
|
|
||||||
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
|
ip_addr_t ip_temp = IPADDR4_INIT(0x0);
|
||||||
ip4_addr_set(ip_2_ip4(&ip_temp), &broadcast_dhcps);
|
ip4_addr_set(ip_2_ip4(&ip_temp), &broadcast_dhcps);
|
||||||
|
#if DHCPS_DEBUG
|
||||||
SendNak_err_t = udp_sendto(pcb_dhcps, p, &ip_temp, DHCPS_CLIENT_PORT);
|
SendNak_err_t = udp_sendto(pcb_dhcps, p, &ip_temp, DHCPS_CLIENT_PORT);
|
||||||
DHCPS_LOG("dhcps: send_nak>>udp_sendto result %x\n", SendNak_err_t);
|
DHCPS_LOG("dhcps: send_nak>>udp_sendto result %x\n", SendNak_err_t);
|
||||||
|
#else
|
||||||
|
udp_sendto(pcb_dhcps, p, &ip_temp, DHCPS_CLIENT_PORT);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (p->ref != 0) {
|
if (p->ref != 0) {
|
||||||
#if DHCPS_DEBUG
|
#if DHCPS_DEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user