summaryrefslogtreecommitdiff
path: root/nuttx/net/uip/uip-tcpinput.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-22 14:42:52 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-22 14:42:52 +0000
commit7d4b2f6253d8ac898def6839b2ccc2ae61e24135 (patch)
tree36587b181e76fc8790f7472f64316c9bb620a31e /nuttx/net/uip/uip-tcpinput.c
parent2ad451b8005afc667718569077c816195f8bd9ec (diff)
downloadpx4-nuttx-7d4b2f6253d8ac898def6839b2ccc2ae61e24135.tar.gz
px4-nuttx-7d4b2f6253d8ac898def6839b2ccc2ae61e24135.tar.bz2
px4-nuttx-7d4b2f6253d8ac898def6839b2ccc2ae61e24135.zip
Add TX data notification
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@397 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/uip/uip-tcpinput.c')
-rw-r--r--nuttx/net/uip/uip-tcpinput.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/nuttx/net/uip/uip-tcpinput.c b/nuttx/net/uip/uip-tcpinput.c
index 1a74d5f81..ba11fcb81 100644
--- a/nuttx/net/uip/uip-tcpinput.c
+++ b/nuttx/net/uip/uip-tcpinput.c
@@ -547,32 +547,34 @@ found:
}
/* Check the URG flag. If this is set, the segment carries urgent
- data that we must pass to the application. */
+ * data that we must pass to the application.
+ */
+
if ((BUF->flags & TCP_URG) != 0)
{
-#if UIP_URGDATA > 0
- uip_urglen = (BUF->urgp[0] << 8) | BUF->urgp[1];
- if (uip_urglen > dev->d_len)
+#ifdef CONFIG_NET_TCPURGDATA
+ dev->d_urglen = (BUF->urgp[0] << 8) | BUF->urgp[1];
+ if (dev->d_urglen > dev->d_len)
{
/* There is more urgent data in the next segment to come. */
- uip_urglen = dev->d_len;
+ dev->d_urglen = dev->d_len;
}
- uip_incr32(conn->rcv_nxt, uip_urglen);
- dev->d_len -= uip_urglen;
- uip_urgdata = dev->d_appdata;
- dev->d_appdata += uip_urglen;
+ uip_incr32(conn->rcv_nxt, dev->d_urglen);
+ dev->d_len -= dev->d_urglen;
+ dev->d_urgdata = dev->d_appdata;
+ dev->d_appdata += dev->d_urglen;
}
else
{
- uip_urglen = 0;
-#else /* UIP_URGDATA > 0 */
+ dev->d_urglen = 0;
+#else /* CONFIG_NET_TCPURGDATA */
dev->d_appdata =
((uint8*)dev->d_appdata) + ((BUF->urgp[0] << 8) | BUF->urgp[1]);
dev->d_len -=
(BUF->urgp[0] << 8) | BUF->urgp[1];
-#endif /* UIP_URGDATA > 0 */
+#endif /* CONFIG_NET_TCPURGDATA */
}
/* If d_len > 0 we have TCP data in the packet, and we flag this