Fixed a stupid bug that prevented DHCP from trying again if a request was lost
(always happened here with my laptop :-)). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20398 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1a38ebd28b
commit
4b661a956f
@ -404,8 +404,7 @@ DHCPClient::_Negotiate(dhcp_state state)
|
||||
char buffer[2048];
|
||||
ssize_t bytesReceived = recvfrom(socket, buffer, sizeof(buffer),
|
||||
0, NULL, NULL);
|
||||
printf("recvfrom returned: %ld, %s\n", bytesReceived, strerror(errno));
|
||||
if (bytesReceived == B_TIMED_OUT) {
|
||||
if (bytesReceived < 0 && errno == B_TIMED_OUT) {
|
||||
// depending on the state, we'll just try again
|
||||
if (!_TimeoutShift(socket, timeout, tries)) {
|
||||
close(socket);
|
||||
|
Loading…
Reference in New Issue
Block a user