Re-applied some changes concerning local sockets. They were reverted by accident.
git-svn-id: svn://kolibrios.org@3259 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
1633df9e80
commit
d12cb9e707
|
@ -827,6 +827,21 @@ SOCKET_receive_dgram:
|
|||
jmp .loop
|
||||
|
||||
|
||||
align 4
|
||||
SOCKET_receive_local:
|
||||
|
||||
; does this socket have a PID yet?
|
||||
cmp [eax + SOCKET.PID], 0
|
||||
jne @f
|
||||
|
||||
; Change PID to that of current process
|
||||
mov ebx, [TASK_BASE]
|
||||
mov ebx, [ebx + TASKDATA.pid]
|
||||
mov [eax + SOCKET.PID], ebx
|
||||
@@:
|
||||
|
||||
mov [eax + SOCKET.rcv_proc], SOCKET_receive_stream
|
||||
|
||||
align 4
|
||||
SOCKET_receive_stream:
|
||||
|
||||
|
@ -949,8 +964,6 @@ SOCKET_send_pppoe:
|
|||
align 4
|
||||
SOCKET_send_local:
|
||||
|
||||
DEBUGF 1,"SOCKET_send: LOCAL\n"
|
||||
|
||||
; does this socket have a PID yet?
|
||||
cmp [eax + SOCKET.PID], 0
|
||||
jne @f
|
||||
|
@ -960,6 +973,12 @@ SOCKET_send_local:
|
|||
mov ebx, [ebx + TASKDATA.pid]
|
||||
mov [eax + SOCKET.PID], ebx
|
||||
@@:
|
||||
mov [eax + SOCKET.snd_proc], SOCKET_send_local_
|
||||
|
||||
align 4
|
||||
SOCKET_send_local_:
|
||||
|
||||
DEBUGF 1,"SOCKET_send: LOCAL\n"
|
||||
|
||||
; get the other side's socket and check if it still exists
|
||||
mov eax, [eax + SOCKET.device]
|
||||
|
@ -1129,7 +1148,7 @@ SOCKET_pair:
|
|||
mov [eax + SOCKET.Type], SOCK_STREAM
|
||||
mov [eax + SOCKET.Protocol], 0 ;;; CHECKME
|
||||
mov [eax + SOCKET.snd_proc], SOCKET_send_local
|
||||
mov [eax + SOCKET.rcv_proc], SOCKET_receive_stream
|
||||
mov [eax + SOCKET.rcv_proc], SOCKET_receive_local
|
||||
mov ebx, eax
|
||||
|
||||
call SOCKET_alloc
|
||||
|
@ -1140,7 +1159,7 @@ SOCKET_pair:
|
|||
mov [eax + SOCKET.Type], SOCK_STREAM
|
||||
mov [eax + SOCKET.Protocol], 0 ;;; CHECKME
|
||||
mov [eax + SOCKET.snd_proc], SOCKET_send_local
|
||||
mov [eax + SOCKET.rcv_proc], SOCKET_receive_stream
|
||||
mov [eax + SOCKET.rcv_proc], SOCKET_receive_local
|
||||
|
||||
; Link the two sockets to eachother
|
||||
mov [eax + SOCKET.device], ebx
|
||||
|
|
Loading…
Reference in New Issue