From 2222c3412cdd6f389db200686a5e11e0138687f7 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 5 Feb 2013 17:24:15 +0000 Subject: [PATCH] Forgot to set the PID in previous revision. git-svn-id: svn://kolibrios.org@3229 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/net/network/socket.inc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/kernel/branches/net/network/socket.inc b/kernel/branches/net/network/socket.inc index ccbc01f00c..c591132b27 100644 --- a/kernel/branches/net/network/socket.inc +++ b/kernel/branches/net/network/socket.inc @@ -953,19 +953,31 @@ SOCKET_send_unix: DEBUGF 1,"SOCKET_send: UNIX\n" - call SOCKET_check - jz s_error + ; 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 + @@: + + ; get the other side's socket and check if it still exists mov eax, [eax + SOCKET.device] call SOCKET_check jz s_error + ; allright, shove in the data! push eax add eax, STREAM_SOCKET.rcv call SOCKET_ring_write pop eax + ; return the number of written bytes (or errorcode) to application mov [esp+32], ecx + ; and notify the other end call SOCKET_notify_owner ret