From a268aaffd64eddd14f0953ba4615baabf296ebb9 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Thu, 5 Apr 2012 13:52:26 +0000 Subject: [PATCH] Changed SOCKET_accept to bind the new socket to the active thread. (net branch) git-svn-id: svn://kolibrios.org@2572 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/net/network/socket.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/branches/net/network/socket.inc b/kernel/branches/net/network/socket.inc index 86a7cc0be8..e44edee5c4 100644 --- a/kernel/branches/net/network/socket.inc +++ b/kernel/branches/net/network/socket.inc @@ -625,8 +625,13 @@ SOCKET_accept: jne s_error get_from_queue (eax + SOCKET_QUEUE_LOCATION), MAX_backlog, 4, s_error - mov eax, [esi] + +; Change PID to that of the current process + mov ebx, [TASK_BASE] + mov ebx, [ebx + TASKDATA.pid] + mov [eax + SOCKET.PID], ebx + call SOCKET_ptr_to_num jz s_error mov [esp+32], eax