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:
@@ -404,8 +404,7 @@ DHCPClient::_Negotiate(dhcp_state state)
|
|||||||
char buffer[2048];
|
char buffer[2048];
|
||||||
ssize_t bytesReceived = recvfrom(socket, buffer, sizeof(buffer),
|
ssize_t bytesReceived = recvfrom(socket, buffer, sizeof(buffer),
|
||||||
0, NULL, NULL);
|
0, NULL, NULL);
|
||||||
printf("recvfrom returned: %ld, %s\n", bytesReceived, strerror(errno));
|
if (bytesReceived < 0 && errno == B_TIMED_OUT) {
|
||||||
if (bytesReceived == B_TIMED_OUT) {
|
|
||||||
// depending on the state, we'll just try again
|
// depending on the state, we'll just try again
|
||||||
if (!_TimeoutShift(socket, timeout, tries)) {
|
if (!_TimeoutShift(socket, timeout, tries)) {
|
||||||
close(socket);
|
close(socket);
|
||||||
|
|||||||
Reference in New Issue
Block a user