diff options
author | Dean Camera <[email protected]> | 2010-02-03 14:09:56 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2010-02-03 14:09:56 +0000 |
commit | f4f44f9fc11d0ee9e0dbaf3323d095af32e8b0ef (patch) | |
tree | 6eb9d93748b655d5b3e69249b8248ce29cc689e4 /Projects/Webserver/Lib/uIPManagement.c | |
parent | 7d3ed400704f76e4ea3bae759d1c2298b1098585 (diff) | |
download | qmk_firmware-f4f44f9fc11d0ee9e0dbaf3323d095af32e8b0ef.tar.gz qmk_firmware-f4f44f9fc11d0ee9e0dbaf3323d095af32e8b0ef.zip |
Re-add Webserver uIP application polling, apply patch to uIP by Andrew Ruder to fix corrupt TCP streams when multiple applications are used and the applications are polled for more data.
Diffstat (limited to 'Projects/Webserver/Lib/uIPManagement.c')
-rw-r--r-- | Projects/Webserver/Lib/uIPManagement.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Projects/Webserver/Lib/uIPManagement.c b/Projects/Webserver/Lib/uIPManagement.c index 37080dfd73..90629b893b 100644 --- a/Projects/Webserver/Lib/uIPManagement.c +++ b/Projects/Webserver/Lib/uIPManagement.c @@ -175,6 +175,21 @@ static void uIPManagement_ProcessIncommingPacket(void) /** Manages the currently open network connections, including TCP and (if enabled) UDP. */
static void uIPManagement_ManageConnections(void)
{
+ /* Poll TCP connections for more data to send back to the host */
+ for (uint8_t i = 0; i < UIP_CONNS; i++)
+ {
+ uip_poll_conn(&uip_conns[i]);
+
+ /* If a response was generated, send it */
+ if (uip_len > 0)
+ {
+ /* Add destination MAC to outgoing packet */
+ uip_arp_out();
+
+ RNDIS_Host_SendPacket(&Ethernet_RNDIS_Interface, uip_buf, uip_len);
+ }
+ }
+
/* Manage open connections for timeouts */
if (timer_expired(&ConnectionTimer))
{
|