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 ecx, [ebp + thread_data.socketnum]
mov edx, [ebp + thread_data.buffer_ptr] mov edx, [ebp + thread_data.buffer_ptr]
mov esi, sizeof.thread_data.buffer ;;; FIXME mov esi, sizeof.thread_data.buffer ;;; FIXME
xor edi, edi
mcall recv mcall recv
inc eax ; error? (-1) inc eax ; error? (-1)
jz threadloop jz threadloop

View File

@ -205,7 +205,7 @@ read_incoming_data:
; TODO: read more data if we receive one full packet ; TODO: read more data if we receive one full packet
.nextpacket: .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 inc eax ; check if we got one
jz .done jz .done
dec eax dec eax

View File

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

View File

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

View File

@ -293,7 +293,7 @@ send_dhcpmsg:
mcall 23, TIMEOUT*10 ; wait for data mcall 23, TIMEOUT*10 ; 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 ; read data from socket mcall 75, 7, [socketNum], [dhcpMsg], BUFFER, 0 ; read data from socket
DEBUGF 1,"->%d bytes received\n", eax DEBUGF 1,"->%d bytes received\n", eax