summaryrefslogtreecommitdiff
path: root/nuttx/net/uip/uip-tcptimer.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-08 16:01:18 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-08 16:01:18 +0000
commit2239a0abb6976e310df0eb3307f089fdb23a3bbf (patch)
tree4de7080546c2d3472da727766e8d9d9a26db5f53 /nuttx/net/uip/uip-tcptimer.c
parent4bbf891c9446414a9a1641a70bc90d294115bd6f (diff)
downloadpx4-nuttx-2239a0abb6976e310df0eb3307f089fdb23a3bbf.tar.gz
px4-nuttx-2239a0abb6976e310df0eb3307f089fdb23a3bbf.tar.bz2
px4-nuttx-2239a0abb6976e310df0eb3307f089fdb23a3bbf.zip
Eliminate most uIP globals
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@378 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/uip/uip-tcptimer.c')
-rw-r--r--nuttx/net/uip/uip-tcptimer.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/nuttx/net/uip/uip-tcptimer.c b/nuttx/net/uip/uip-tcptimer.c
index 66210e246..beb16bc0f 100644
--- a/nuttx/net/uip/uip-tcptimer.c
+++ b/nuttx/net/uip/uip-tcptimer.c
@@ -95,6 +95,8 @@
void uip_tcptimer(struct uip_driver_s *dev, struct uip_conn *conn, int hsec)
{
+ uint8 result;
+
dev->d_snddata = &dev->d_buf[UIP_IPTCPH_LEN + UIP_LLH_LEN];
dev->d_appdata = &dev->d_buf[UIP_IPTCPH_LEN + UIP_LLH_LEN];
@@ -157,13 +159,12 @@ void uip_tcptimer(struct uip_driver_s *dev, struct uip_conn *conn, int hsec)
conn->tcpstateflags = UIP_CLOSED;
vdbg("TCP state: UIP_CLOSED\n");
- /* We call uip_tcpcallback() with uip_flags set to
- * UIP_TIMEDOUT to inform the application that the
- * connection has timed out.
+ /* We call uip_tcpcallback() with UIP_TIMEDOUT to
+ * inform the application that the connection has
+ * timed out.
*/
- uip_flags = UIP_TIMEDOUT;
- uip_tcpcallback(dev);
+ result = uip_tcpcallback(dev, conn, UIP_TIMEDOUT);
/* We also send a reset packet to the remote host. */
@@ -209,9 +210,8 @@ void uip_tcptimer(struct uip_driver_s *dev, struct uip_conn *conn, int hsec)
* the code for sending out the packet.
*/
- uip_flags = UIP_REXMIT;
- uip_tcpcallback(dev);
- uip_tcprexmit(dev, conn, uip_flags);
+ result = uip_tcpcallback(dev, conn, UIP_REXMIT);
+ uip_tcprexmit(dev, conn, result);
goto done;
case UIP_FIN_WAIT_1:
@@ -233,9 +233,8 @@ void uip_tcptimer(struct uip_driver_s *dev, struct uip_conn *conn, int hsec)
* application for new data.
*/
- uip_flags = UIP_POLL;
- uip_tcpcallback(dev);
- uip_tcpappsend(dev, conn, uip_flags);
+ result = uip_tcpcallback(dev, conn, UIP_POLL);
+ uip_tcpappsend(dev, conn, result);
goto done;
}
}
@@ -245,7 +244,6 @@ void uip_tcptimer(struct uip_driver_s *dev, struct uip_conn *conn, int hsec)
dev->d_len = 0;
done:
- uip_flags = 0;
return;
}