From 4b661a956f1d4f25bb7187a8a018375241ce05ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 20 Mar 2007 22:09:53 +0000 Subject: [PATCH] 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 --- src/servers/net/DHCPClient.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/servers/net/DHCPClient.cpp b/src/servers/net/DHCPClient.cpp index d55c7a5001..e984fa7105 100644 --- a/src/servers/net/DHCPClient.cpp +++ b/src/servers/net/DHCPClient.cpp @@ -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);