From 6410339384e35074fbe2a320ca60a10d3bc4c8b4 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Wed, 29 May 2013 08:20:31 +0000 Subject: [PATCH] Fixed bug in some network applications. git-svn-id: svn://kolibrios.org@3562 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ftpd/ftpd.asm | 1 + programs/network/ircc/socket.inc | 2 +- programs/network/pppoe/pppoe.asm | 2 +- programs/network/tcpserv/tcpserv.asm | 2 +- programs/network/zeroconf/zeroconf.asm | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/programs/network/ftpd/ftpd.asm b/programs/network/ftpd/ftpd.asm index 1378897f27..e3c7a6b469 100644 --- a/programs/network/ftpd/ftpd.asm +++ b/programs/network/ftpd/ftpd.asm @@ -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 diff --git a/programs/network/ircc/socket.inc b/programs/network/ircc/socket.inc index 3b11930716..473065b468 100644 --- a/programs/network/ircc/socket.inc +++ b/programs/network/ircc/socket.inc @@ -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 diff --git a/programs/network/pppoe/pppoe.asm b/programs/network/pppoe/pppoe.asm index af9b51b8b9..9805d659df 100644 --- a/programs/network/pppoe/pppoe.asm +++ b/programs/network/pppoe/pppoe.asm @@ -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 diff --git a/programs/network/tcpserv/tcpserv.asm b/programs/network/tcpserv/tcpserv.asm index 6e71f2b468..2795aa53b2 100644 --- a/programs/network/tcpserv/tcpserv.asm +++ b/programs/network/tcpserv/tcpserv.asm @@ -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 diff --git a/programs/network/zeroconf/zeroconf.asm b/programs/network/zeroconf/zeroconf.asm index 3fde8df43b..94c6c3a003 100644 --- a/programs/network/zeroconf/zeroconf.asm +++ b/programs/network/zeroconf/zeroconf.asm @@ -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