From 931d4df6c10ea5e58c1a4053e8125cbbb6ccd07d Mon Sep 17 00:00:00 2001 From: "Mihail Semenyako (mike.dld)" Date: Wed, 5 Nov 2008 14:50:17 +0000 Subject: [PATCH] Fix for r907 (uninitialized prev/next pointers in sockets list) git-svn-id: svn://kolibrios.org@909 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/network/socket.inc | 4 ++-- kernel/trunk/network/stack.inc | 4 +++- kernel/trunk/network/udp.inc | 2 -- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/trunk/network/socket.inc b/kernel/trunk/network/socket.inc index 093f069a5..648a69354 100644 --- a/kernel/trunk/network/socket.inc +++ b/kernel/trunk/network/socket.inc @@ -84,6 +84,8 @@ $Revision$ ; so, define struct struc SOCKET { + .PrevPtr dd ? + .NextPtr dd ? .Status dd ? ;+00 - Status ( of this buffer ) .PID dd ? ;+04 - Application Process ID .LocalIP dd ? ;+08 - Local IP Address @@ -105,8 +107,6 @@ struc SOCKET .SEG_LEN dd ? ;+64 - Segment length .SEG_WND dd ? ;+68 - Segment window .wndsizeTimer dd ? ;+72 - Retransmit queue # NOW WINDOW SIZE TIMER - .PrevPtr dd ? - .NextPtr dd ? .rxData dd ? ;+76 - receive data buffer here } diff --git a/kernel/trunk/network/stack.inc b/kernel/trunk/network/stack.inc index 914cb4248..8690cfbd9 100644 --- a/kernel/trunk/network/stack.inc +++ b/kernel/trunk/network/stack.inc @@ -134,7 +134,6 @@ resendBuffer equ resendQ + ( 8 * NUMRESENDENTRIES ) ; for TCP uglobal -net_sockets_mutex dd 0 net_sockets rd 2 endg @@ -178,6 +177,9 @@ stack_init: ;_memset_dw resendQ, 0xFFFFFFFF, NUMRESENDENTRIES ; XTODO: validate size _memset_dw resendQ, 0xFFFFFFFF, NUMRESENDENTRIES * 2 + mov [net_sockets], 0 + mov [net_sockets + 4], 0 + ; Queries initialization call queueInit diff --git a/kernel/trunk/network/udp.inc b/kernel/trunk/network/udp.inc index 22efbbfe1..ab90e5231 100644 --- a/kernel/trunk/network/udp.inc +++ b/kernel/trunk/network/udp.inc @@ -84,8 +84,6 @@ proc udp_rx stdcall mov ax, [edx + 20 + UDP_PACKET.DestinationPort] ; get the local port from ; the IP packet's UDP header - mov ebx, net_sockets_mutex - call wait_mutex mov ebx, net_sockets .next_socket: