From 7ce53df3a1697295ffa65d0fef176efea8f8ec9d Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Wed, 5 Jun 2013 00:44:59 +0000 Subject: [PATCH] Fixed bugs in new ARP code and TCP_output. git-svn-id: svn://kolibrios.org@3602 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/network/ARP.inc | 8 ++++---- kernel/trunk/network/socket.inc | 2 -- kernel/trunk/network/tcp_output.inc | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/kernel/trunk/network/ARP.inc b/kernel/trunk/network/ARP.inc index 96cdc84a4f..e3c49a2d63 100644 --- a/kernel/trunk/network/ARP.inc +++ b/kernel/trunk/network/ARP.inc @@ -548,10 +548,10 @@ if ARP_BLOCK cmp [esi + ARP_entry.Status], ARP_AWAITING_RESPONSE ; Are we waiting for reply from remote end? jne .give_up - push esi edi + push esi mov esi, 10 ; wait 10 ms call delay_ms - pop edi esi + pop esi jmp .found_it ; now check again else @@ -562,8 +562,8 @@ end if .valid: DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_IP_to_MAC: found MAC\n" - movzx eax, word[edi + ARP_entry.MAC] - mov ebx, dword[edi + ARP_entry.MAC + 2] + movzx eax, word[esi + ARP_entry.MAC] + mov ebx, dword[esi + ARP_entry.MAC + 2] ret .full: diff --git a/kernel/trunk/network/socket.inc b/kernel/trunk/network/socket.inc index 6a9c0ada73..8bc2b10271 100644 --- a/kernel/trunk/network/socket.inc +++ b/kernel/trunk/network/socket.inc @@ -514,8 +514,6 @@ align 4 pushd [edx + 4] pop [eax + IP_SOCKET.RemoteIP] - DEBUGF 1, "Connecting to 0x%x\n", [eax + IP_SOCKET.RemoteIP] - cmp [eax + UDP_SOCKET.LocalPort], 0 jne @f call SOCKET_find_port diff --git a/kernel/trunk/network/tcp_output.inc b/kernel/trunk/network/tcp_output.inc index 6c7140ce16..9d91943b14 100644 --- a/kernel/trunk/network/tcp_output.inc +++ b/kernel/trunk/network/tcp_output.inc @@ -594,12 +594,12 @@ TCP_send: pop eax mov [eax + TCP_SOCKET.timer_retransmission], TCP_time_re_min - or [ebx + TCP_SOCKET.timer_flags], timer_flag_retransmission + or [eax + TCP_SOCKET.timer_flags], timer_flag_retransmission lea ecx, [eax + SOCKET.mutex] call mutex_unlock - DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_send: IP error\n" + DEBUGF DEBUG_NETWORK_ERROR, "TCP_send: IP error\n" or eax, -1 ret @@ -611,7 +611,7 @@ TCP_send: lea ecx, [eax + SOCKET.mutex] call mutex_unlock - DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_send: sending failed\n" + DEBUGF DEBUG_NETWORK_ERROR, "TCP_send: sending failed\n" or eax, -2 ret