Rev 10051 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 10051 | Rev 10058 | ||
---|---|---|---|
Line 743... | Line 743... | ||
743 | test eax, eax |
743 | test eax, eax |
744 | jz .invalid |
744 | jz .invalid |
Line 745... | Line 745... | ||
745 | 745 | ||
Line 746... | Line 746... | ||
746 | mov dword[esp + SYSCALL_STACK.eax], 0 ; The socket exists, so we will succeed in closing it. |
746 | mov dword[esp + SYSCALL_STACK.eax], 0 ; The socket exists, so we will succeed in closing it. |
Line 747... | Line 747... | ||
747 | 747 | ||
748 | or [eax + SOCKET.options], SO_NONBLOCK ; Mark the socket as non blocking, we dont want it to block any longer! |
748 | or [eax + SOCKET.options], SO_NONBLOCK ; Mark the socket as non blocking, we don't want it to block any longer! |
749 | 749 | ||
750 | test [eax + SOCKET.state], SS_BLOCKED ; Is the socket still in blocked state? |
750 | test [eax + SOCKET.state], SS_BLOCKED ; Is the socket still in blocked state? |
Line 1053... | Line 1053... | ||
1053 | pop eax |
1053 | pop eax |
Line 1054... | Line 1054... | ||
1054 | 1054 | ||
1055 | mov [esp + SYSCALL_STACK.eax], ecx |
1055 | mov [esp + SYSCALL_STACK.eax], ecx |
1056 | mov [eax + SOCKET.errorcode], 0 |
1056 | mov [eax + SOCKET.errorcode], 0 |
1057 | push eax |
1057 | push eax |
1058 | call tcp_output ; FIXME: this doesnt look pretty, does it? |
1058 | call tcp_output ; FIXME: this doesn't look pretty, does it? |
1059 | pop eax |
1059 | pop eax |
1060 | mov eax, [eax + SOCKET.errorcode] |
1060 | mov eax, [eax + SOCKET.errorcode] |
1061 | mov [esp + SYSCALL_STACK.ebx], eax |
1061 | mov [esp + SYSCALL_STACK.ebx], eax |
Line 1832... | Line 1832... | ||
1832 | call mutex_unlock |
1832 | call mutex_unlock |
1833 | pop ecx eax |
1833 | pop ecx eax |
Line 1834... | Line 1834... | ||
1834 | 1834 | ||
Line 1835... | Line 1835... | ||
1835 | ret |
1835 | ret |
1836 | 1836 | ||
1837 | .error: ; we could free all available bytes, but that would be stupid, i guess.. |
1837 | .error: ; we could free all available bytes, but that would be stupid, I guess.. |
Line 1838... | Line 1838... | ||
1838 | DEBUGF DEBUG_NETWORK_ERROR, "SOCKET_ring_free: buffer=%x error!\n", eax |
1838 | DEBUGF DEBUG_NETWORK_ERROR, "SOCKET_ring_free: buffer=%x error!\n", eax |
1839 | add [eax + RING_BUFFER.size], ecx |
1839 | add [eax + RING_BUFFER.size], ecx |