Fix for r907 (uninitialized prev/next pointers in sockets list)

git-svn-id: svn://kolibrios.org@909 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Mihail Semenyako (mike.dld) 2008-11-05 14:50:17 +00:00
parent 9ad23608e6
commit 931d4df6c1
3 changed files with 5 additions and 5 deletions

View File

@ -84,6 +84,8 @@ $Revision$
; so, define struct ; so, define struct
struc SOCKET struc SOCKET
{ {
.PrevPtr dd ?
.NextPtr dd ?
.Status dd ? ;+00 - Status ( of this buffer ) .Status dd ? ;+00 - Status ( of this buffer )
.PID dd ? ;+04 - Application Process ID .PID dd ? ;+04 - Application Process ID
.LocalIP dd ? ;+08 - Local IP Address .LocalIP dd ? ;+08 - Local IP Address
@ -105,8 +107,6 @@ struc SOCKET
.SEG_LEN dd ? ;+64 - Segment length .SEG_LEN dd ? ;+64 - Segment length
.SEG_WND dd ? ;+68 - Segment window .SEG_WND dd ? ;+68 - Segment window
.wndsizeTimer dd ? ;+72 - Retransmit queue # NOW WINDOW SIZE TIMER .wndsizeTimer dd ? ;+72 - Retransmit queue # NOW WINDOW SIZE TIMER
.PrevPtr dd ?
.NextPtr dd ?
.rxData dd ? ;+76 - receive data buffer here .rxData dd ? ;+76 - receive data buffer here
} }

View File

@ -134,7 +134,6 @@ resendBuffer equ resendQ + ( 8 * NUMRESENDENTRIES ) ; for TCP
uglobal uglobal
net_sockets_mutex dd 0
net_sockets rd 2 net_sockets rd 2
endg endg
@ -178,6 +177,9 @@ stack_init:
;_memset_dw resendQ, 0xFFFFFFFF, NUMRESENDENTRIES ; XTODO: validate size ;_memset_dw resendQ, 0xFFFFFFFF, NUMRESENDENTRIES ; XTODO: validate size
_memset_dw resendQ, 0xFFFFFFFF, NUMRESENDENTRIES * 2 _memset_dw resendQ, 0xFFFFFFFF, NUMRESENDENTRIES * 2
mov [net_sockets], 0
mov [net_sockets + 4], 0
; Queries initialization ; Queries initialization
call queueInit call queueInit

View File

@ -84,8 +84,6 @@ proc udp_rx stdcall
mov ax, [edx + 20 + UDP_PACKET.DestinationPort] ; get the local port from mov ax, [edx + 20 + UDP_PACKET.DestinationPort] ; get the local port from
; the IP packet's UDP header ; the IP packet's UDP header
mov ebx, net_sockets_mutex
call wait_mutex
mov ebx, net_sockets mov ebx, net_sockets
.next_socket: .next_socket: