Fix DHCP client retries.

In order to have DHCP retries actually work dhcpc_appcall() must be called for PROCESS_EVENT_TIMER too.
This commit is contained in:
Oliver Schmidt 2015-06-21 14:25:52 +02:00
parent 55e568e7cb
commit b8bece508a
2 changed files with 9 additions and 10 deletions

View file

@ -116,7 +116,6 @@ PROCESS_THREAD(dhcp_process, ev, data)
ctk_window_open(&window); ctk_window_open(&window);
dhcpc_init(uip_lladdr.addr, sizeof(uip_lladdr.addr)); dhcpc_init(uip_lladdr.addr, sizeof(uip_lladdr.addr));
while(1) { while(1) {
PROCESS_WAIT_EVENT(); PROCESS_WAIT_EVENT();
@ -125,7 +124,7 @@ PROCESS_THREAD(dhcp_process, ev, data)
dhcpc_request(); dhcpc_request();
set_statustext("Requesting..."); set_statustext("Requesting...");
} }
} else if(ev == tcpip_event) { } else if(ev == tcpip_event || ev == PROCESS_EVENT_TIMER) {
dhcpc_appcall(ev, data); dhcpc_appcall(ev, data);
} else if(ev == PROCESS_EVENT_EXIT || } else if(ev == PROCESS_EVENT_EXIT ||
ev == ctk_signal_window_close) { ev == ctk_signal_window_close) {

View file

@ -212,7 +212,7 @@ PROCESS_THREAD(ipconfig_process, ev, data)
if(ev == PROCESS_EVENT_MSG) { if(ev == PROCESS_EVENT_MSG) {
makestrings(); makestrings();
ctk_window_redraw(&window); ctk_window_redraw(&window);
} else if(ev == tcpip_event) { } else if(ev == tcpip_event || ev == PROCESS_EVENT_TIMER) {
dhcpc_appcall(ev, data); dhcpc_appcall(ev, data);
} else if(ev == ctk_signal_button_activate) { } else if(ev == ctk_signal_button_activate) {
if(data == (process_data_t)&requestbutton) { if(data == (process_data_t)&requestbutton) {