* Implemented lease time renewal.

* The DHCPClient is now added to its looper before doing the negotiation, so that
  it's BMessenger is already valid.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19478 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-12-12 17:55:48 +00:00
parent a552ec1396
commit 6cc7630f36
3 changed files with 148 additions and 81 deletions
+8 -4
View File
@@ -43,11 +43,15 @@ AutoconfigLooper::_ReadyToRun()
// start with DHCP
DHCPClient* client = new DHCPClient(fTarget, fDevice.String());
if (client->InitCheck() == B_OK) {
AddHandler(client);
AddHandler(client);
if (client->Initialize() == B_OK)
return;
}
puts("DHCP failed miserably!");
RemoveHandler(client);
delete client;
puts("DHCP failed miserably!");
// DHCP obviously didn't work out, take some default values for now
// TODO: have a look at zeroconf