Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fc8e7596f | ||
|
|
8a4662a4c1 | ||
|
|
78d8a28f6c | ||
|
|
8d0f70c92d |
No files matched your search
@@ -1233,27 +1233,25 @@ f68:
|
||||
mov eax, [ecx + SRV.entry]
|
||||
test eax, eax
|
||||
jz .fail
|
||||
mov eax, -2 ;error free RAM
|
||||
cmp [ecx + SRV.base], 0
|
||||
je .fail
|
||||
push ecx ;save handl
|
||||
|
||||
push ecx ;save handl
|
||||
mov ebp, esp ;START may be cdecl or stdcall
|
||||
push edx ;cmdline
|
||||
push DRV_EXIT
|
||||
call [ecx + SRV.entry] ;the result is not checked
|
||||
mov esp, ebp
|
||||
pop esi
|
||||
call eax ;the result is not checked
|
||||
lea esp, [esp+8]
|
||||
push ecx
|
||||
|
||||
mov eax, [esi + SRV.fd]
|
||||
mov edx, [esi + SRV.bk]
|
||||
mov ebx, [ecx + SRV.base]
|
||||
mov eax, -2 ;error free RAM
|
||||
test ebx, ebx
|
||||
jz .fail
|
||||
stdcall kernel_free, ebx ;del driver
|
||||
|
||||
mov eax, [ecx + SRV.fd]
|
||||
mov edx, [ecx + SRV.bk]
|
||||
mov [edx + SRV.fd], eax
|
||||
mov [eax + SRV.bk], edx
|
||||
push eax
|
||||
stdcall kernel_free, [esi + SRV.base] ;del driver
|
||||
mov eax, esi
|
||||
call free ;eax = mem
|
||||
pop eax
|
||||
stdcall free, ecx
|
||||
;dec [count_services]
|
||||
|
||||
mov [esp + SYSCALL_STACK.eax], eax
|
||||
|
||||
@@ -1068,6 +1068,11 @@ socket_send_tcp:
|
||||
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_send: TCP\n"
|
||||
|
||||
; Connection closed or reset by peer?
|
||||
|
||||
test [eax + SOCKET.state], SS_CANTSENDMORE
|
||||
jnz .cantsendmore
|
||||
|
||||
push eax
|
||||
add eax, STREAM_SOCKET.snd
|
||||
call socket_ring_write
|
||||
@@ -1082,6 +1087,16 @@ socket_send_tcp:
|
||||
mov [esp + SYSCALL_STACK.ebx], eax
|
||||
ret
|
||||
|
||||
.cantsendmore:
|
||||
mov ebx, [eax + SOCKET.errorcode]
|
||||
test ebx, ebx
|
||||
jnz @f
|
||||
mov ebx, ENOTCONN
|
||||
@@:
|
||||
mov [esp + SYSCALL_STACK.ebx], ebx
|
||||
mov dword[esp + SYSCALL_STACK.eax], -1
|
||||
ret
|
||||
|
||||
|
||||
align 4
|
||||
socket_send_ip:
|
||||
|
||||
@@ -864,6 +864,10 @@ endl
|
||||
mov [ebx + TCP_SOCKET.t_state], TCPS_CLOSED
|
||||
inc [TCPS_drops]
|
||||
|
||||
; Stop the timers, wake up the application
|
||||
mov eax, ebx
|
||||
call tcp_cancel_timers
|
||||
call socket_is_disconnected
|
||||
|
||||
jmp .drop
|
||||
|
||||
|
||||
@@ -63,6 +63,15 @@ endl
|
||||
|
||||
.not_idle:
|
||||
.again:
|
||||
; Connection was reset by peer, send nothing
|
||||
cmp [eax + TCP_SOCKET.t_state], TCPS_CLOSED
|
||||
jne @f
|
||||
mov ebx, [eax + SOCKET.state]
|
||||
and ebx, SS_CANTSENDMORE + SS_ISDISCONNECTING
|
||||
cmp ebx, SS_CANTSENDMORE
|
||||
je .nothing_to_send
|
||||
@@:
|
||||
|
||||
mov [temp_bits], 0
|
||||
|
||||
; Calculate offset
|
||||
@@ -306,6 +315,7 @@ endl
|
||||
;----------------------------
|
||||
; No reason to send a segment
|
||||
|
||||
.nothing_to_send:
|
||||
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_output: No reason to send a segment\n"
|
||||
|
||||
pusha
|
||||
|
||||
Reference in new issue
Block a user