forked from KolibriOS/kolibrios
Fixed timeout
git-svn-id: svn://kolibrios.org@4805 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e55d76c573
commit
0d3fa411d8
@ -304,15 +304,21 @@ request_options:
|
|||||||
send_dhcpmsg:
|
send_dhcpmsg:
|
||||||
DEBUGF 1,"Sending DHCP discover/request\n"
|
DEBUGF 1,"Sending DHCP discover/request\n"
|
||||||
mcall 75, 6, [socketNum], [dhcpMsg], [dhcpMsgLen] ; write to socket ( send broadcast request )
|
mcall 75, 6, [socketNum], [dhcpMsg], [dhcpMsgLen] ; write to socket ( send broadcast request )
|
||||||
|
mcall 26, 9
|
||||||
|
add eax, TIMEOUT*100
|
||||||
|
mov [timeout], eax
|
||||||
.wait:
|
.wait:
|
||||||
mcall 23, TIMEOUT*100 ; wait for data
|
mcall 23, TIMEOUT ; wait for data
|
||||||
|
|
||||||
read_data: ; we have data - this will be the response
|
read_data: ; we have data - this will be the response
|
||||||
mcall 75, 7, [socketNum], [dhcpMsg], BUFFER, MSG_DONTWAIT ; read data from socket
|
mcall 75, 7, [socketNum], [dhcpMsg], BUFFER, MSG_DONTWAIT ; read data from socket
|
||||||
cmp eax, -1
|
cmp eax, -1
|
||||||
jne @f
|
jne @f
|
||||||
cmp ebx, 6 ; EWOULDBLOCK
|
|
||||||
je send_dhcpmsg.wait
|
mcall 26, 9
|
||||||
|
cmp eax, [timeout]
|
||||||
|
jb send_dhcpmsg.wait
|
||||||
|
|
||||||
DEBUGF 2,"No answer from DHCP server\n"
|
DEBUGF 2,"No answer from DHCP server\n"
|
||||||
dec [tries]
|
dec [tries]
|
||||||
jnz send_dhcpmsg ; try again
|
jnz send_dhcpmsg ; try again
|
||||||
@ -571,6 +577,7 @@ link_local:
|
|||||||
mcall 5, ANNOUNCE_INTERVAL*100
|
mcall 5, ANNOUNCE_INTERVAL*100
|
||||||
jmp announce_loop
|
jmp announce_loop
|
||||||
@@:
|
@@:
|
||||||
|
jmp exit
|
||||||
|
|
||||||
|
|
||||||
error:
|
error:
|
||||||
@ -670,4 +677,6 @@ generator dd ?
|
|||||||
|
|
||||||
dhcpMsg dd ?
|
dhcpMsg dd ?
|
||||||
|
|
||||||
|
timeout dd ?
|
||||||
|
|
||||||
I_END:
|
I_END:
|
Loading…
Reference in New Issue
Block a user