Only try once

This commit is contained in:
simon.kagstrom 2010-03-06 15:58:38 +00:00
parent 775227f24c
commit 9fc781c55e

View File

@ -92,13 +92,10 @@ void Network::InitNetwork()
memset(myIP, 0, sizeof(myIP)); memset(myIP, 0, sizeof(myIP));
Gui::gui->status_bar->queueMessage("Getting IP address via DHCP..."); Gui::gui->status_bar->queueMessage("Getting IP address via DHCP...");
/* Try twice */
if (if_config(myIP, NULL, NULL, true) < 0) { if (if_config(myIP, NULL, NULL, true) < 0) {
if (if_config(myIP, NULL, NULL, true) < 0)
{
Gui::gui->status_bar->queueMessage("No DHCP reply"); Gui::gui->status_bar->queueMessage("No DHCP reply");
return; return;
}
} }
Gui::gui->status_bar->queueMessage("Got an address"); Gui::gui->status_bar->queueMessage("Got an address");
} }