Skip to content

Instantly share code, notes, and snippets.

@ddv2005
Created September 8, 2013 16:02
Show Gist options
  • Save ddv2005/6485920 to your computer and use it in GitHub Desktop.
Save ddv2005/6485920 to your computer and use it in GitHub Desktop.
diff --git a/UIPEthernet.cpp b/UIPEthernet.cpp
index 0a762ed..3025718 100644
--- a/UIPEthernet.cpp
+++ b/UIPEthernet.cpp
@@ -154,13 +154,13 @@ UIPEthernetClass::tick()
uip_len = network_read_next(UIP_BUFSIZE, (uint8_t *)uip_buf);
if (ETH_HDR ->type == HTONS(UIP_ETHTYPE_IP))
{
+ network_read_end();
uip_arp_ipin();
uip_input();
if (packetstream > 0)
{
return;
}
- network_read_end();
if (uip_len > 0)
{
uip_arp_out();
@@ -176,6 +176,7 @@ UIPEthernetClass::tick()
network_send();
}
}
+ else network_read_end();
}
if (timer_expired(&periodic_timer))
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment