diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2011-10-09 13:14:53 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2011-10-09 13:14:53 +0000 |
commit | c9e817ff478b94b5bae4b853f913cc32d9c94a19 (patch) | |
tree | 46c9d5000fdde239763fdfd4d4ebb4c697986d6a /Demos/Device/ClassDriver/RNDISEthernet | |
parent | 68e777e16bd252c90d300c02ae88ff27b2fdb70d (diff) | |
download | lufa-c9e817ff478b94b5bae4b853f913cc32d9c94a19.tar.gz lufa-c9e817ff478b94b5bae4b853f913cc32d9c94a19.tar.bz2 lufa-c9e817ff478b94b5bae4b853f913cc32d9c94a19.zip |
Fixed port state table corruption in the TCP layer of the RNDIS Ethernet device demos.
Fix additional warnings under GCC 4.6.
Diffstat (limited to 'Demos/Device/ClassDriver/RNDISEthernet')
-rw-r--r-- | Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c index a49995ccc..ccaac4cf7 100644 --- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c +++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/TCP.c @@ -182,7 +182,7 @@ bool TCP_SetPortState(const uint16_t Port, /* Note, Port number should be specified in BIG endian to simplify network code */ /* Check to see if the port entry is already in the port state table */ - for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++) + for (uint8_t PTableEntry = 0; PTableEntry < MAX_OPEN_TCP_PORTS; PTableEntry++) { /* Find existing entry for the port in the table, update it if found */ if (PortStateTable[PTableEntry].Port == Port) @@ -196,7 +196,7 @@ bool TCP_SetPortState(const uint16_t Port, /* Check if trying to open the port -- if so we need to find an unused (closed) entry and replace it */ if (State == TCP_Port_Open) { - for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++) + for (uint8_t PTableEntry = 0; PTableEntry < MAX_OPEN_TCP_PORTS; PTableEntry++) { /* Find a closed port entry in the table, change it to the given port and state */ if (PortStateTable[PTableEntry].State == TCP_Port_Closed) @@ -228,7 +228,7 @@ uint8_t TCP_GetPortState(const uint16_t Port) { /* Note, Port number should be specified in BIG endian to simplify network code */ - for (uint8_t PTableEntry = 0; PTableEntry < MAX_TCP_CONNECTIONS; PTableEntry++) + for (uint8_t PTableEntry = 0; PTableEntry < MAX_OPEN_TCP_PORTS; PTableEntry++) { /* Find existing entry for the port in the table, return the port status if found */ if (PortStateTable[PTableEntry].Port == Port) |