Forgot to set the PID in previous revision.

git-svn-id: svn://kolibrios.org@3229 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-02-05 17:24:15 +00:00
parent 14019f31f8
commit 2222c3412c

View File

@ -953,19 +953,31 @@ SOCKET_send_unix:
DEBUGF 1,"SOCKET_send: UNIX\n" DEBUGF 1,"SOCKET_send: UNIX\n"
call SOCKET_check ; does this socket have a PID yet?
jz s_error 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
@@:
; get the other side's socket and check if it still exists
mov eax, [eax + SOCKET.device] mov eax, [eax + SOCKET.device]
call SOCKET_check call SOCKET_check
jz s_error jz s_error
; allright, shove in the data!
push eax push eax
add eax, STREAM_SOCKET.rcv add eax, STREAM_SOCKET.rcv
call SOCKET_ring_write call SOCKET_ring_write
pop eax pop eax
; return the number of written bytes (or errorcode) to application
mov [esp+32], ecx mov [esp+32], ecx
; and notify the other end
call SOCKET_notify_owner call SOCKET_notify_owner
ret ret