From 2bc923d897f2a381ec286ac25d01d468bb3fecb1 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 9 Apr 2013 11:43:59 +0000 Subject: [PATCH] SOCKET_receive_stream returns 0 now when there is no data instead of -1. git-svn-id: svn://kolibrios.org@3461 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/net/network/socket.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/branches/net/network/socket.inc b/kernel/branches/net/network/socket.inc index 98fdbd2167..bdc5d0bd8b 100644 --- a/kernel/branches/net/network/socket.inc +++ b/kernel/branches/net/network/socket.inc @@ -876,11 +876,16 @@ SOCKET_receive_stream: .block: test [eax + SOCKET.options], SO_NONBLOCK - jnz s_error + jnz .return0 call SOCKET_block jmp .loop + .return0: + xor ecx, ecx + mov [esp+32], ecx + ret + ;----------------------------------------------------------------- ;