Author: zhu
Date: Fri Jul 29 16:28:01 2016
New Revision: 72051
URL: http://svn.reactos.org/svn/reactos?rev=72051&view=rev
Log:
Major rewrite of address.c, completely restructuring internal data. No longer maintaining linked list of connection endpoints; their references are handed off to lwIP to keep track of in protocol control blocks. Scrapped redundant functions in duplicate address checking code in favor of exposing lwIP's free-port checking function and letting lwIP handle address collisions when binding. Added a custom mutex that allows only one execution context to access each connection endpoint (TCP_CONTEXT). Massively improved coding style consistency.
Server side can handle multiple incoming connections in series without crashing, but there is an undiagnosed issue that causes frequent crashes on repeated attempts to connect to a server. The crash always happens after a call to tcp_connect() has been made, and before it returns.
No attempted solution to the lwIP multi-threading problem in this commit.
Modified:
branches/GSoC_2016/lwIP-tcpip/base/applications/network/tcpclient/main.c
branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.c
branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.h
branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/main.c
branches/GSoC_2016/lwIP-tcpip/sdk/lib/drivers/lwip/src/core/tcp.c
branches/GSoC_2016/lwIP-tcpip/sdk/lib/drivers/lwip/src/core/udp.c
branches/GSoC_2016/lwIP-tcpip/sdk/lib/drivers/lwip/src/include/lwip/tcp.h
branches/GSoC_2016/lwIP-tcpip/sdk/lib/drivers/lwip/src/include/lwip/udp.h
[This mail would be too long, it was shortened to contain the URLs only.]
Modified: branches/GSoC_2016/lwIP-tcpip/base/applications/network/tcpclient/main.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/lwIP-tcpip/base/appli…
Modified: branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/lwIP-tcpip/drivers/ne…
Modified: branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/address.h
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/lwIP-tcpip/drivers/ne…
Modified: branches/GSoC_2016/lwIP-tcpip/drivers/network/tcpip/main.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/lwIP-tcpip/drivers/ne…
Modified: branches/GSoC_2016/lwIP-tcpip/sdk/lib/drivers/lwip/src/core/tcp.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/lwIP-tcpip/sdk/lib/dr…
Modified: branches/GSoC_2016/lwIP-tcpip/sdk/lib/drivers/lwip/src/core/udp.c
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/lwIP-tcpip/sdk/lib/dr…
Modified: branches/GSoC_2016/lwIP-tcpip/sdk/lib/drivers/lwip/src/include/lwip/tcp.h
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/lwIP-tcpip/sdk/lib/dr…
Modified: branches/GSoC_2016/lwIP-tcpip/sdk/lib/drivers/lwip/src/include/lwip/udp.h
URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/lwIP-tcpip/sdk/lib/dr…
Author: hbelusca
Date: Fri Jul 29 13:44:37 2016
New Revision: 72050
URL: http://svn.reactos.org/svn/reactos?rev=72050&view=rev
Log:
[PCIX]
Fix Device_SaveCurrentSettings: do not reference BarArray too soon if the index is out of bounds (in that case it means we are handling a ROM "BAR").
CID 716153, reported by Victor Martinez Calvo.
CORE-11215 #resolve
Modified:
trunk/reactos/drivers/bus/pcix/device.c
Modified: trunk/reactos/drivers/bus/pcix/device.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/device.c?…
==============================================================================
--- trunk/reactos/drivers/bus/pcix/device.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/pcix/device.c [iso-8859-1] Fri Jul 29 13:44:37 2016
@@ -46,12 +46,12 @@
CmDescriptor->u.Generic.Start.HighPart = 0;
CmDescriptor->u.Generic.Length = IoDescriptor->u.Generic.Length;
- /* Read the actual BAR value */
- Bar = BarArray[i];
-
- /* Check which BAR is being processed now */
- if (i != PCI_TYPE0_ADDRESSES)
- {
+ /* Check if we're handling PCI BARs, or the ROM BAR */
+ if (i < PCI_TYPE0_ADDRESSES)
+ {
+ /* Read the actual BAR value */
+ Bar = BarArray[i];
+
/* Check if this is an I/O BAR */
if (Bar & PCI_ADDRESS_IO_SPACE)
{