diff --git a/kernel/branches/net/kernel.asm b/kernel/branches/net/kernel.asm index adb243e634..bc65946dec 100644 --- a/kernel/branches/net/kernel.asm +++ b/kernel/branches/net/kernel.asm @@ -77,7 +77,7 @@ $Revision $ USE_COM_IRQ equ 1 ; make irq 3 and irq 4 available for PCI devices ; Enabling the next line will enable serial output console -;debug_com_base equ 0x3f8 ; 0x3f8 is com1, 0x2f8 is com2, 0x3e8 is com3, 0x2e8 is com4, no irq's are used +debug_com_base equ 0x2f8 ; 0x3f8 is com1, 0x2f8 is com2, 0x3e8 is com3, 0x2e8 is com4, no irq's are used include "proc32.inc" include "kglobals.inc" @@ -2044,12 +2044,12 @@ sysfn_terminate: ; 18.2 = TERMINATE mov eax, [TASK_COUNT] mov edx, [ecx+CURRENT_TASK+TASKDATA.pid] - cmp byte [ecx+CURRENT_TASK+TASKDATA.state], 9 + add ecx, CURRENT_TASK+TASKDATA.state + cmp byte [ecx], 9 jz noprocessterminate ;-------------------------------------- ; terminate all network sockets it used pusha - mov eax, edx call SOCKET_process_end popa ;-------------------------------------- diff --git a/kernel/branches/net/network/socket.inc b/kernel/branches/net/network/socket.inc index 69d7c84a6d..6befa1b74c 100644 --- a/kernel/branches/net/network/socket.inc +++ b/kernel/branches/net/network/socket.inc @@ -1711,29 +1711,28 @@ SOCKET_check_owner: ; This function will check if the process had any open sockets ; And update them accordingly ; -; IN: eax = pid +; IN: edx = pid ; OUT: / ; ;------------------------------------------------------ align 4 SOCKET_process_end: - DEBUGF 1,"SOCKET_process_end: %x\n", eax + DEBUGF 1,"SOCKET_process_end: %x\n", edx push ebx mov ebx, net_sockets .next_socket: - mov ebx, [ebx + SOCKET.NextPtr] .test_socket: test ebx, ebx jz .done - cmp [ebx + SOCKET.PID], eax + cmp [ebx + SOCKET.PID], edx jne .next_socket - DEBUGF 1,"closing socket %x", eax, ebx + DEBUGF 1,"closing socket %x", edx, ebx mov [ebx + SOCKET.PID], 0 @@ -1748,7 +1747,6 @@ SOCKET_process_end: jmp .test_socket .tcp: - push [ebx + SOCKET.NextPtr] mov eax, ebx call TCP_close