From a5c3784aca3eeda58bd0980531a08233ce320fa3 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Mon, 24 Jun 2013 10:47:25 +0000 Subject: [PATCH] Fixed that horrible TCP kernel crash. git-svn-id: svn://kolibrios.org@3697 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/network/tcp.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/network/tcp.inc b/kernel/trunk/network/tcp.inc index c999070ef3..9e9f6f3f63 100644 --- a/kernel/trunk/network/tcp.inc +++ b/kernel/trunk/network/tcp.inc @@ -127,8 +127,9 @@ struct TCP_queue_entry ends -align 4 uglobal +align 4 + TCP_segments_tx rd NET_DEVICES_MAX TCP_segments_rx rd NET_DEVICES_MAX TCP_segments_missed rd NET_DEVICES_MAX @@ -136,7 +137,7 @@ uglobal ; TCP_bytes_rx rq NET_DEVICES_MAX ; TCP_bytes_tx rq NET_DEVICES_MAX TCP_sequence_num dd ? - TCP_queue rd TCP_QUEUE_SIZE*sizeof.TCP_queue_entry/4 + TCP_queue rd (TCP_QUEUE_SIZE*sizeof.TCP_queue_entry + sizeof.queue)/4 TCP_input_event dd ? endg @@ -163,6 +164,10 @@ macro TCP_init { movi ebx, 1 mov ecx, TCP_process_input call new_sys_threads + test eax, eax + jns @f + DEBUGF DEBUG_NETWORK_ERROR,'K : cannot create kernel thread for TCP, error %d\n', eax + @@: }