Fixed bug in some network applications.

git-svn-id: svn://kolibrios.org@3562 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-05-29 08:20:31 +00:00
parent 0330fba15f
commit 6410339384
5 changed files with 5 additions and 4 deletions

View File

@ -270,6 +270,7 @@ threadloop:
mov ecx, [ebp + thread_data.socketnum]
mov edx, [ebp + thread_data.buffer_ptr]
mov esi, sizeof.thread_data.buffer ;;; FIXME
xor edi, edi
mcall recv
inc eax ; error? (-1)
jz threadloop

View File

@ -205,7 +205,7 @@ read_incoming_data:
; TODO: read more data if we receive one full packet
.nextpacket:
mcall recv, [socketnum], packetbuf, 1024 ; read a packet
mcall recv, [socketnum], packetbuf, 1024, 0 ; read a packet
inc eax ; check if we got one
jz .done
dec eax

View File

@ -129,7 +129,7 @@ mainloop:
test eax, 0x200 ; con window closed?
jnz close_conn
mcall recv, [socketnum], buffer, 4096
mcall recv, [socketnum], buffer, 4096, 0
cmp eax, sizeof.PPPoE_frame
jb mainloop

View File

@ -79,7 +79,7 @@ start:
.loop:
mcall 10
mcall recv, [socketnum2], buffer, buffer.length
mcall recv, [socketnum2], buffer, buffer.length, 0
cmp eax, -1
je .loop

View File

@ -293,7 +293,7 @@ send_dhcpmsg:
mcall 23, TIMEOUT*10 ; wait for data
read_data: ; we have data - this will be the response
mcall 75, 7, [socketNum], [dhcpMsg], BUFFER ; read data from socket
mcall 75, 7, [socketNum], [dhcpMsg], BUFFER, 0 ; read data from socket
DEBUGF 1,"->%d bytes received\n", eax