Check for errors from socket_receive.

git-svn-id: svn://kolibrios.org@5358 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2015-01-06 15:37:25 +00:00
parent 82d7c79bd5
commit 583e5570af

View File

@ -763,9 +763,13 @@ end virtual
push edi push edi
mcall 75, 7, , , 512, MSG_DONTWAIT mcall 75, 7, , , 512, MSG_DONTWAIT
pop edi pop edi
; 3. Ignore events for other socketnums (return if no data read) ; 3. Check for socket errors
test eax, eax cmp eax, -1
jz .ret.more_processing_required jne @f
cmp ebx, EWOULDBLOCK
je .ret.more_processing_required
jmp .ret.no_recovery
@@:
; 4. Sanity check: discard too short packets. ; 4. Sanity check: discard too short packets.
xchg ecx, eax ; save packet length in ecx xchg ecx, eax ; save packet length in ecx
cmp ecx, 12 cmp ecx, 12